//用react封装
var currentpage = 1,totlepage = 1,i,appParam = "",appCurrentpage = "1",appNum = 0,paramPromo = "",paramPromoOne = "",chongQParam = '',appPaySetMenuParam = '',paramCurrentpage = "1",promoNum = 0,pageNumberOld = localStorage.pagecount;//分页的当前页和总的页数
//表单数据：购买详情、付款状态、付款状态、购买日期、联系人、联系电话、联系电话、设备IMEI号、快递单号、发货时间、订单号
var tableData = [],promoData = [],schoolDataAll = [],schoolDataList = [];
//所有生产厂商
var factoryData = [];
//表单的当前第几页、总页数、总行数 tableType:1（app购买）,2为学校促销活动,3为重庆订单
var otherData = {pageLeft:0,pageRight:0,tableType:'1'};
var Page = React.createClass({
    setPage: function (e) {
        setPage($(e.target).html());
        this.props.onPageClick(1);
    },
    showPage: function () {
        showPage();
    },
    render: function () {
        {
            var items = [],
                svar = this;
            if(totlepage == 0 ){
                items.push({num:1,checked:true})
            }else if(totlepage < 6){
                for(i = 1;i <= totlepage ;i++) {
                    if (i == currentpage) {
                        items.push({num:i,checked:true})
                    } else {
                        items.push({num:i,checked:false})
                    }
                }
            }else if(currentpage >= (totlepage-2)) {//点在左边
                items.push({num:1,checked:false});
                items.push({num:'···',checked:false});
                for(i = totlepage-2;i <= totlepage ;i++){
                    if(i == currentpage){
                        items.push({num:i,checked:true})
                    }else{
                        items.push({num:i,checked:false})
                    }
                }
            }else if(currentpage <= 3){
                for(i = 1;i <= 3 ;i++) {
                    if (i == currentpage) {
                        items.push({num:i,checked:true})
                    } else {
                        items.push({num:i,checked:false})
                    }
                }
                items.push({num:'···',checked:false});
                items.push({num:totlepage,checked:false})
            }else {//点在两边
                items.push({num:1,checked:false});
                items.push({num:'···',checked:false});
                items.push({num:currentpage-1,checked:false});
                items.push({num:currentpage,checked:true});
                items.push({num:currentpage+1,checked:false});
                items.push({num:'···',checked:false});
                items.push({num:totlepage,checked:false})
            }
        }
        return (
            <div className="studentsInfo-page tableInfo-page">
                <div className="page-number">每页<span className="page-number-list" onClick={this.showPage}>{pagecount}</span>条</div>
                <div className="page-list" style={{top:pageListTop+"px"}}>
                    <ul>
                        {
                            pageList.map(function (item) {
                                return (<li onClick={svar.setPage}>{item}</li>)
                            })
                        }
                    </ul>
                </div>
                <div className="page-limit">
                    <ol className="page-limit-ol">
                        <li className="page-limit-img" name="-1" onClick={otherData.pageLeft == 0?'':svar.props.onPageClick.bind(svar,-1)} ><span className={otherData.pageLeft == 0?'page-limit-left-no':'page-limit-left-yes'}/></li>
                        {
                            items.map(function (item) {
                                return (<li onClick={isNaN(item.num)?'':svar.props.onPageClick.bind(svar,item.num)} className={item.checked == true?'page-limit-num page-limit-checked':'page-limit-num'} name={item.num}>{item.num}</li>)
                            })
                        }
                        <li className="page-limit-img" name="-2" onClick={otherData.pageRight == 0?'':svar.props.onPageClick.bind(svar,-2)}><span className={otherData.pageRight == 0?'page-limit-right-no':'page-limit-right-yes'}/></li>
                    </ol>
                </div>
            </div>
        );
    },
});

//app订单
var AppTable = React.createClass({
    render: function () {

        //状态(1正常0取消订单-1订单退款中，-2退款失败，2退款成功)
        var status = '',isMdtid = true,failReason = '',APPOrHJY = $('.APP-select-HJY-value').html();
        if(this.props.status == '0'){
            status = '取消订单';
        }else if(this.props.status == '-1'){
            status = '订单退款中';
        }else if(this.props.status == '-2'){
            status = '退款失败';
            failReason = this.props.failReason;
        }else if(this.props.status == '2'){
            status = '退款成功';
        }else if(this.props.status == '1'){
            status = '已发货';
        }
        if(this.props.mdtid == null || this.props.mdtid == '' ){
            isMdtid = false;
        }
        return (
            <tr>
                <td style={{width: '4%'}}>{parseInt(this.props.listNumber)+1}</td>
                <td style={{width: '10%'}}>{this.props.payDetails}</td>
                <td style={{width: '9%'}}>{this.props.orderno}</td>
                <td style={{width: '5%'}}>{this.props.paystatus}</td>
                <td style={{width: '5%'}}>{this.props.paymoney}</td>
                <td style={{width: '9%'}}>{this.props.paytime}</td>
                <td style={{width: '7%'}}>{this.props.peoplename}</td>
                <td style={{width: '7%'}}>{this.props.peopletel}</td>
                <td style={{width: '11%'}}>{this.props.deliveryaddr}</td>
                <td style={{width: '8%'}}>{this.props.mdtid}</td>
                <td style={{width: '7%'}}>{this.props.deliveryno}</td>
                <td style={{width: '9%'}}>{this.props.sendtime}</td>
                <td style={{width: '9%'}}>
                    <span style={{display:isMdtid == true?'none':(this.props.status != "1"?"block":'none'),color:this.props.status=="0"?"#FF5959":this.props.status=="-2"?"#FF5959":" #01b4ee"}} title={failReason}>{status}</span>
                    <span style={{display:isMdtid == true?(this.props.status == "1"?"block":'none'):'none',color:"#01b4ee"}} >{status}</span>
                    <div style={{display:isMdtid == true?'none':(this.props.status=="1"?"inline-block":'none')}} className='trButton trLeft clickDliver' onClick={this.props.onClickDeliverGoods}>发货</div>
                    {
                        APPOrHJY=='APP订单'?
                            <div style={{display:isMdtid == true?'none':(this.props.status=="1"?"inline-block":'none')}} className="trButton trLeft closeOrder" onClick={this.props.onClickCloseDeliverGoods}>退款</div>
                            :''
                    }
                    {
                        /**
                         * <div style={{display:this.props.deviceid != null?(parseInt(this.props.deviceid) > 0?"inline-block":'none'):"none"}} className="trButton trLeft clickDliver" title="查看原卡信息" onClick={this.props.onClickSeleteImei}>查看</div>
                         */
                    }
                </td>
            </tr>
        );
    }
});
//重庆订单
var ChongQTable = React.createClass({
    render: function () {
        {
            var type = false;
            if(this.props.sendtime == '' || this.props.sendtime == null){
                type = true;
            }
        }
        return (
            <tr>
                <td style={{width: '4%'}}>{parseInt(this.props.listNumber)+1}</td>
                <td style={{width: '8%'}}>{this.props.payDetails}</td>
                <td style={{width: '7%'}}>{this.props.paystatus}</td>
                <td style={{width: '10%'}}>{this.props.orderno}</td>
                <td style={{width: '6%'}}>{this.props.paymoney}</td>
                <td style={{width: '8%'}}>{this.props.createtime}</td>
                <td style={{width: '7%'}}>{this.props.studentname}</td>
                <td style={{width: '6%'}}>{this.props.classname}</td>
                <td style={{width: '10%'}}>{this.props.schoolname}</td>
                <td style={{width: '8%'}}>{this.props.telephone}</td>
                <td style={{width: '9%'}}>{this.props.mdtid}</td>
                <td style={{width: '8%'}}>{this.props.sendtime}</td>
                <td style={{width: '9%'}}>
                    <span style={{display:type == true?(this.props.status=="0"?"block":'none'):'none',color:"#FF5959"}}>订单已取消</span>
                    <span style={{display:type == true?'none':(this.props.status=="1"?"block":'none'),color:"#01b4ee"}}>已配送</span>
                    <div style={{display:this.props.mdtid != null?'none':(this.props.status=="0"?"none":'inline-block')}} className='trButton trLeft clickDliver' onClick={this.props.onClickChongQDeliverGoods}>配送</div>
                    <div style={{display:this.props.mdtid != null?'none':(this.props.status=="0"?"none":'inline-block')}} className="trButton trLeft closeOrder" onClick={this.props.onClickCloseChongQDeliverGoods}>取消</div>
                    <div style={{display:type == true?'none':(this.props.status=="1"?"inline-block":'none')}} className="trButton trLeft clickDliver" onClick={this.props.onClickChongQSelete}>查看</div>
                </td>
            </tr>
        );
    }
});
//缴费订单
var AppPaySetMenuTable = React.createClass({
    render: function () {
        var APPOrHJYTwo = $('.APP-select-HJY-two-value').html();
        return (
            <tr>
                <td style={{width: '8%'}}>{parseInt(this.props.listNumber)+1}</td>
                <td style={{width: '16%'}}>{this.props.orderno}</td>
                <td style={{width: '15%'}}>{this.props.mdtid}</td>
                <td style={{width: '12%'}}>{this.props.renewalaccount}</td>
                <td style={{width: '12%'}}>{this.props.renewalmoney}</td>
                <td style={{width: '12%'}}>{this.props.renewalPackage}</td>
                <td style={{width: '15%'}}>{this.props.renewaltime}</td>
                <td style={{width: '10%'}}>
                    <span style={{display:this.props.status == '-1'?'block':'none',color:"#FF5959"}}>退款失败</span>
                    <span style={{display:this.props.status == '-1'?'none':(this.props.status != '1'?'block':'none'),color:"#01b4ee"}}>{this.props.status == '2'?'退款中':'退款成功'}</span>
                    {
                        APPOrHJYTwo=='APP订单'?
                            <div style={{display:this.props.status == '1'?'block':'none'}} className='trButton trLeft clickDliver' onClick={this.props.onClickCloseDeliverGoods}>退款</div>
                            :""
                    }
                </td>
            </tr>
        );
    }
});
//促销活动订单
var PromoTable = React.createClass({
    clickChecked: function () {
        var childsCheckBox = $(".onlinePay-tbody").children();
        var b = 0,a = 0;
        for(var i = 0;i<childsCheckBox.length;i++){
            var child = $($(childsCheckBox[i]).children()[0]).children();
            if($(child[0]).length == 0){
                a ++;
            }
            if($(child[0]).is(':checked')){
                b ++;
            }
        };
        if(b == childsCheckBox.length-a){
            $(".onlineCheckBox").prop('checked',true);
        }else{
            $('.onlineCheckBox').attr('checked',false);
        }
    },
    render: function () {
        return (
            <tr>
                <td style={{width: '3%'}}>{this.props.mdtid == null?(this.props.status!="0"?<input onClick={this.clickChecked} className="onlineChildCheckBox" data-value={this.props.orderno} type="checkbox"/>:''):""}</td>
                <td style={{width: '4%'}}>{parseInt(this.props.listNumber)+1}</td>
                <td style={{width: '7%'}}>{this.props.devicetype}</td>
                <td style={{width: '7%'}}>{this.props.orderno}</td>
                <td style={{width: '7%'}}>{this.props.paystatus}</td>
                <td style={{width: '7%'}}>{this.props.devicepackage==null?"":this.props.devicepackage+"年"}</td>
                <td style={{width: '7%'}}>{this.props.paymoney==null?0:parseInt(this.props.paymoney).toFixed(2)}</td>
                <td style={{width: '10%'}}>{this.props.createtime}</td>
                <td style={{width: '6%'}}>{this.props.studentname}</td>
                <td style={{width: '6%'}}>{this.props.telephone}</td>
                <td style={{width: '8%'}}>{this.props.classname}</td>
                <td style={{width: '10%'}}>{this.props.schoolname}</td>
                <td style={{width: '9%'}}>{this.props.sendtime}</td>
                <td style={{width: '9%'}}>
                    <span style={{display:this.props.mdtid != null?'block':(this.props.status=="0"?"block":'none'),color:this.props.status=="0"?"#FF5959":" #01b4ee"}}>{this.props.status=="0"?"订单已取消":"已配送"}</span>
                    <div style={{display:this.props.mdtid != null?'none':(this.props.status=="0"?"none":'inline-block')}} className='trButton trLeft clickDliver' onClick={this.props.onClickDeliverGoodsPromo}>配送</div>
                    <div style={{display:this.props.mdtid != null?'none':(this.props.status=="0"?"none":'inline-block')}} className="trButton trLeft closeOrder" onClick={this.props.onClickCloseOrderPromo}>取消</div>
                </td>
            </tr>
        );
    }
});


//促销活动订单一
var PromoTableOne = React.createClass({
    clickChecked: function () {
        var childsCheckBox = $(".onlinePay-tbody").children();
        var b = 0,a = 0;
        for(var i = 0;i<childsCheckBox.length;i++){
            var child = $($(childsCheckBox[i]).children()[0]).children();
            if($(child[0]).length == 0){
                a ++;
            }
            if($(child[0]).is(':checked')){
                b ++;
            }
        };
        if(b == childsCheckBox.length-a){
            $(".onlineCheckBox").prop('checked',true);
        }else{
            $('.onlineCheckBox').attr('checked',false);
        }
    },
    render: function () {
        return (
            <tr>
                <td style={{width: '3%'}}>{this.props.mdtid == null?(this.props.status!="0"?<input onClick={this.clickChecked} className="onlineChildCheckBox" data-value={this.props.orderno} type="checkbox"/>:''):""}</td>
                <td style={{width: '4%'}}>{parseInt(this.props.listNumber)+1}</td>
                <td style={{width: '7%'}}>{this.props.devicetype}</td>
                <td style={{width: '7%'}}>{this.props.orderno}</td>
                <td style={{width: '6%'}}>{this.props.paystatus}</td>
                <td style={{width: '6%'}}>{this.props.devicepackage==null?"":this.props.devicepackage+"年"}</td>
                <td style={{width: '6%'}}>{this.props.paymoney==null?0:parseInt(this.props.paymoney).toFixed(2)}</td>
                <td style={{width: '8%'}}>{this.props.createtime}</td>
                <td style={{width: '6%'}}>{this.props.studentname}</td>
                <td style={{width: '6%'}}>{this.props.telephone}</td>
                <td style={{width: '7%'}}>{this.props.classname}</td>
                <td style={{width: '9%'}}>{this.props.schoolname}</td>
                <td style={{width: '8%'}}>{this.props.province+this.props.city+this.props.town}</td>
                <td style={{width: '8%'}}>{this.props.sendtime}</td>
                <td style={{width: '9%'}}>
                    <span style={{display:this.props.mdtid != null?'block':(this.props.status=="0"?"block":'none'),color:this.props.status=="0"?"#FF5959":" #01b4ee"}}>{this.props.status=="0"?"订单已取消":"已配送"}</span>
                    <div style={{display:this.props.mdtid != null?'none':(this.props.status=="0"?"none":'inline-block')}} className='trButton trLeft clickDliver' onClick={this.props.onClickDeliverGoodsPromo}>配送</div>
                    <div style={{display:this.props.mdtid != null?'none':(this.props.status=="0"?"none":'inline-block')}} className="trButton trLeft closeOrder" onClick={this.props.onClickCloseOrderPromo}>取消</div>
                </td>
            </tr>
        );
    }
});

//父组件
var Main = React.createClass({
    //组件初始状态
    getInitialState: function () {
        return {
            otherData:this.props.otherData,
            tableData:this.props.tableData,
            factoryData:this.props.factoryData,
            promoData:this.props.promoData,
            promoDataOne: [],
            schoolDataAll:this.props.schoolDataAll,
            schoolDataList:this.props.schoolDataList,
            ChongQDataList : [],//列表的数据
            ChongQData : [],//一行的数据
            appPaySetMenuData : [],//缴费订单（购买的套餐）

        }
    },
    componentDidMount: function () {
        //使用ajax取出数据然后组装数据列表
        // 然后使用this.setState();
        var svar = this;
        suixun.ajax(serverUrl+'/onlinepayManage/queryOnlinepayList.json?param={pagenumber:1,pagecount:'+pagecount+'}','',"get",function(data){
            setTimeout(function () {
                suixun.hideLoding();//隐藏加载中
            },500);
            if(data.code == 200){
                appNum = data.info.warningrows;
                for(var i=0;i<data.info.queryresult.length;i++){
                    var obj=data.info.queryresult[i];
                    var deliveryaddr = obj.deliveryaddr;
                    var peoplename = obj.peoplename;
                    if(obj.deliveryaddr != "未知" && obj.deliveryaddr != null){
                        var address = eval("["+obj.deliveryaddr+"]");
                        deliveryaddr = address[0].p+" "+address[0].c+" "+address[0].t+" "+address[0].d;
                        if(address[0].name != ""){
                            peoplename = address[0].name;
                        }
                    }
                    var payDetails = "";//购买详情
                    if(obj.smartcardnum != null && parseInt(obj.smartcardnum) > 0){
                        payDetails += "智能学生证("+obj.smartcardnum+"张)，"
                    }
                    if(obj.whitecard1num != null &&  parseInt(obj.whitecard1num) > 0){
                        payDetails += "2.4G考勤卡("+obj.whitecard1num+"张)，"
                    }
                    if(obj.whitecard2num != null &&  parseInt(obj.whitecard2num) > 0){
                        payDetails += "13.56考勤卡("+obj.whitecard2num+"张)，"
                    }
                    if(payDetails != ""){
                        payDetails = payDetails.substring(0,payDetails.length-1);
                    }
                    tableData[i] = {keyid:i,payDetails:payDetails,failReason:obj.failReason,status:obj.status,deviceid:obj.deviceid,devicetype:obj.devicetype,factory:obj.factory,paymoney:obj.paymoney,paytime:obj.paytime,peoplename:peoplename,peopletel:obj.peopletel,deliveryaddr:deliveryaddr,mdtid:obj.mdtid,deliveryno:obj.deliveryno,sendtime:obj.sendtime,orderno:obj.orderno,paystatus:obj.paystatus};
                }
                //查询生产商
//                        factoryData[0] = {selectFactory:'全部',factoryId:'factory_'+0};
//                        for(var i = 0;i<data.info.factorys.length;i++){
//                            factoryData[i+1] = {selectFactory:data.info.factorys[i].factory,factoryId:'factory_'+i};
//                        }
                otherData.pageRight = 0;
                if(data.info.totlepage > 1){
                    otherData.pageRight = 1;
                }
                otherData.pageLeft = 0;
                currentpage = 1;totlepage = data.info.totlepage;//初始化的时候赋值：分页的当前页和总的页数
                svar.setState({tableData:tableData,otherData:otherData,factoryData:factoryData});
            }
            svar.msgNumber();//未处理订单条数
        });
        //绑定回车时间
        $(document).keypress(function(e) {
            var eCode = e.keyCode ? e.keyCode : e.which ? e.which : e.charCode;
            if (eCode == 13){
                if($(".enterEvent").is(":focus")){
                    svar.onClickQuery();
                }
            }
        });
    },
    /**
     * 查询未配送的学校
     * @param tableType 2:限时优惠订单 5:优惠订单1
     */
    querySchool: function (tableType) {
        var svar = this;
        var url = serverUrl+'/onlinepayManage/getSchoolsByDiscount.json';
        if(tableType==5){
            url = serverUrl+'/onlinepayManage/getSchoolsByNewDiscount.json';
        }
        suixun.ajax(url,'',"get",function(data){
            schoolDataList = [];
            if(data.code == 200 ){
                for(var i=0;i<data.info.length;i++){
                    var obj=data.info[i];
                    schoolDataList[i] = {key:i,schoolname:obj.schoolname};
                }
                schoolDataAll = schoolDataList;
                svar.setState({schoolDataList:schoolDataList,schoolDataAll:schoolDataAll});
                console.log(schoolDataList);
            }else{
                svar.setState({schoolDataList:schoolDataList,schoolDataAll:schoolDataAll});
            }
        });
    },
    /**
     * 未处理订单条数
     * @param num
     */
    msgNumber: function () {
        suixun.ajax(serverUrl+'/onlinepayManage/getNotSendCounts.json','',"get",function(data){
            if(data.code==200 ){
                var appNum = data.info.appNotSendCounts,promoNum = data.info.discountNotSendCounts,chongQNum = data.info.chongqingNotSendCounts,promoNumOne = data.info.newDiscountNotSendCounts;
                var orderNum = appNum+chongQNum+promoNum+promoNumOne;
                //修改主页menu显示的数量
                if(orderNum > 99){
                    $(".msgNumber-buyOnline").html("99+");
                }else if(0 < orderNum && orderNum <= 99){
                    $(".msgNumber-buyOnline", window.parent.document).html(orderNum);
                }else{
                    $(".msgNumber-buyOnline", window.parent.document).addClass(" hidden");
                }
                //app购买
                if(appNum>99){
                    $(".appDelgoodsNum").show();
                    $(".appDelgoodsNum").html("99+");
                }else if(0<appNum && appNum<=99){
                    $(".appDelgoodsNum").show();
                    $(".appDelgoodsNum").html(appNum);
                }else{
                    $(".appDelgoodsNum").hide();
                }
                //促销
                if(promoNum>99){
                    $(".promoDelgoodsNumOne").show();
                    $(".promoDelgoodsNumOne").html("99+");
                }else if(0<promoNum && promoNum<=99){
                    $(".promoDelgoodsNumOne").show();
                    $(".promoDelgoodsNumOne").html(promoNum);
                }else{
                    $(".promoDelgoodsNumOne").hide();
                }
                //促销订单一
                if(promoNumOne>99){
                    $(".promoDelgoodsNumTwo").show();
                    $(".promoDelgoodsNumTwo").html("99+");
                }else if(0<promoNumOne && promoNumOne<=99){
                    $(".promoDelgoodsNumTwo").show();
                    $(".promoDelgoodsNumTwo").html(promoNumOne);
                }else{
                    $(".promoDelgoodsNumTwo").hide();
                }
                //促销-重庆订单
                if(chongQNum>99){
                    $(".chongQDelgoodsNum").show();
                    $(".chongQDelgoodsNum").html("99+");
                }else if(0<chongQNum && chongQNum<=99){
                    $(".chongQDelgoodsNum").show();
                    $(".chongQDelgoodsNum").html(chongQNum);
                }else{
                    $(".chongQDelgoodsNum").hide();
                }
            }else{
                $(".msgNumber-buyOnline", window.parent.document).addClass(" hidden");
                $(".appDelgoodsNum").hide();
                $(".promoDelgoodsNumOne").hide();
                $(".chongQDelgoodsNum").hide();
                $(".promoDelgoodsNumTwo").hide();
            }
        });


    },
    /**
     * 点击查询
     */
    onClickQuery: function () {
        suixun.showLoding();//显示加载中
        var svar = this;
        svar.msgNumber();//未处理订单条数
        if(otherData.tableType == "1"){//普通订单
            var selectVal = $(".payApp").html();
            var APPOrHJY = $(".APP-select-HJY-value").html();
            var param="param={";
            if(selectVal == "已发货"){
                param = getJsonDataNotEmpty(param,"orderstatus","1");
            }else  if(selectVal == "未发货"){
                param = getJsonDataNotEmpty(param,"orderstatus","2");
                param = getJsonDataNotEmpty(param,"status","1");
            }else  if(selectVal == "已取消"){
                param = getJsonDataNotEmpty(param,"status","0");
            }
            if(APPOrHJY=='和教育订单'){
                param = getJsonDataNotEmpty(param,"orderType","1");
            }
            param = getJsonDataNotEmpty(param,"peopletel",$(".appQueryVal").val());
            param = getJsonDataNotEmpty(param,"pagenumber","1");
            param = getJsonDataNotEmpty(param,"pagecount",pagecount+'');
            param += "}";
            appParam = param;
            appCurrentpage = 1;
            suixun.ajax(serverUrl+'/onlinepayManage/queryOnlinepayList.json',param,"get",function(data){
                suixun.hideLoding();//隐藏加载中
                if(data.code == 200){
                    tableData = [];
                    for(var i=0;i<data.info.queryresult.length;i++){
                        var obj=data.info.queryresult[i];
                        var deliveryaddr = obj.deliveryaddr;
                        var peoplename = obj.peoplename;
                        if(obj.deliveryaddr != "未知" && obj.deliveryaddr != null){
                            var address = eval("["+obj.deliveryaddr+"]");
                            deliveryaddr = address[0].p+" "+address[0].c+" "+address[0].t+" "+address[0].d;
                            if(address[0].name != ""){
                                peoplename = address[0].name;
                            }
                        }
                        var payDetails = "";//购买详情
                        if(obj.smartcardnum != null && parseInt(obj.smartcardnum) > 0){
                            payDetails += "智能学生证("+obj.smartcardnum+"张)，"
                        }
                        if(obj.whitecard1num != null &&  parseInt(obj.whitecard1num) > 0){
                            payDetails += "2.4G考勤卡("+obj.whitecard1num+"张)，"
                        }
                        if(obj.whitecard2num != null &&  parseInt(obj.whitecard2num) > 0){
                            payDetails += "13.56考勤卡("+obj.whitecard2num+"张)，"
                        }
                        if(payDetails != ""){
                            payDetails = payDetails.substring(0,payDetails.length-1);
                        }
                        tableData[i] = {keyid:i,payDetails:payDetails,failReason:obj.failReason,status:obj.status,devicetype:obj.devicetype,factory:obj.factory,paystatus:obj.paystatus,paymoney:obj.paymoney,paytime:obj.paytime,peoplename:peoplename,peopletel:obj.peopletel,deliveryaddr:deliveryaddr,mdtid:obj.mdtid,deliveryno:obj.deliveryno,sendtime:obj.sendtime,orderno:obj.orderno};
                    }

                    otherData.pageRight = 0;
                    if(data.info.totlepage > 1){
                        otherData.pageRight = 1;
                    }
                    otherData.pageLeft = 0;
                    currentpage = 1;totlepage = data.info.totlepage;//初始化的时候赋值：分页的当前页和总的页数
                    svar.setState({tableData:tableData,otherData:otherData});
                }
            });
        }else if(otherData.tableType == "2"){//促销订单
            var seclectSchoolName = $("#seclectSchoolName").html();
            if(seclectSchoolName == "筛选学校：全部" ){
                seclectSchoolName = "";
            }
            var selectVal = $(".payPromo").html(),param="param={";
            if(selectVal == "已配送"){
                param = getJsonDataNotEmpty(param,"sendstatus","1");
            }else  if(selectVal == "未配送"){
                param = getJsonDataNotEmpty(param,"sendstatus","0");
                param = getJsonDataNotEmpty(param,"status","1");
            }else  if(selectVal == "已取消"){
                param = getJsonDataNotEmpty(param,"status","0");
            }
            param = getJsonDataNotEmpty(param,"studentname",'"'+$(".promoQueryVal").val()+'"');
            param = getJsonDataNotEmpty(param,"schoolname",'"'+seclectSchoolName+'"');

            param = getJsonDataNotEmpty(param,"pagenumber","1");
            param = getJsonDataNotEmpty(param,"pagecount",pagecount+'');
            param += "}";
            paramPromo = param;
            paramCurrentpage = 1;
            suixun.ajax(serverUrl+'/onlinepayManage/queryDiscountList.json',param,"get",function(data){
                promoData = [];
                suixun.hideLoding();//隐藏加载中
                $(".onlineCheckBox").attr("checked",false);
                $(".onlineChildCheckBox").attr("checked",false);
                if(data.code == 200){
                    for(var i=0;i<data.info.queryresult.length;i++){
                        var obj=data.info.queryresult[i];
                        promoData[i] = {keyid:i,province:obj.province,status:obj.status,telephone:obj.telephone,devicepackage:obj.devicepackage,packagefee:obj.packagefee,city:obj.city,town:obj.town,id:obj.id,devicetype:obj.devicetype,paystatus:obj.paystatus,paymoney:obj.paymoney,createtime:obj.createtime,studentname:obj.studentname,classname:obj.classname,schoolname:obj.schoolname,mdtid:obj.mdtid,sendtime:obj.sendtime,orderno:obj.orderno};
                    }
                    otherData.pageRight = 0;
                    if(data.info.totlepage > 1){
                        otherData.pageRight = 1;
                    }
                    otherData.pageLeft = 0;
                    totlepage = data.info.totlepage;//初始化的时候赋值：分页的当前页和总的页数
                    currentpage = 1;
                    svar.setState({promoData:promoData,otherData:otherData});
                }else{
                    otherData.pageLeft = 0;
                    otherData.pageRight = 0;
                    totlepage = 1;//初始化的时候赋值：分页的当前页和总的页数
                    currentpage = 1;
                    svar.setState({promoData:promoData,otherData:otherData});
                }

            });
        }else if(otherData.tableType == "3"){//重庆订单
            var selectVal = $(".chongQPromo").html(),param="param={";
            if(selectVal == "已配送"){
                param = getJsonDataNotEmpty(param,"sendstatus","1");
            }else  if(selectVal == "未配送"){
                param = getJsonDataNotEmpty(param,"sendstatus","0");
                param = getJsonDataNotEmpty(param,"status","1");
            }else  if(selectVal == "已取消"){
                param = getJsonDataNotEmpty(param,"status","0");
            }
            param = getJsonDataNotEmpty(param,"telephone",'"'+$(".chongQQueryVal").val()+'"');
            param = getJsonDataNotEmpty(param,"pagenumber","1");
            param = getJsonDataNotEmpty(param,"pagecount",pagecount+'');
            param += "}";
            chongQParam = param;
            paramCurrentpage = 1;
            suixun.ajax(serverUrl+'/onlinepayManage/getChongqingOrders.json',param,"get",function(data){
                svar.state.ChongQDataList = [];
                suixun.hideLoding();//隐藏加载中
                if(data.code == 200){
                    for(var i=0;i<data.info.queryresult.length;i++){
                        var obj=data.info.queryresult[i];
                        var payDetails = "智能学生证";//购买详情
                        svar.state.ChongQDataList[i] = {keyid:i,payDetails:payDetails,paystatus:obj.paystatus,smspush:obj.smspush,orderno:obj.orderno,paymoney:obj.paymoney,createtime:obj.createtime,studentname:obj.studentname,classname:obj.classname,schoolname:obj.schoolname,mdtid:obj.mdtid,sendtime:obj.sendtime,telephone:obj.telephone,status:obj.status};
                    }
                    otherData.pageRight = 0;
                    if(data.info.totlepage > 1){
                        otherData.pageRight = 1;
                    }
                    otherData.pageLeft = 0;
                    totlepage = data.info.totlepage;//初始化的时候赋值：分页的当前页和总的页数
                    currentpage = 1;
                    svar.setState({ChongQDataList:svar.state.ChongQDataList,otherData:otherData});
                }else{
                    otherData.pageLeft = 0;
                    otherData.pageRight = 0;
                    totlepage = 1;//初始化的时候赋值：分页的当前页和总的页数
                    currentpage = 1;
                    svar.setState({ChongQDataList:svar.state.ChongQDataList,otherData:otherData});
                }

            });
        }else if(otherData.tableType == "4"){//缴费订单
            var APPOrHJY = $(".APP-select-HJY-two-value").html();
            var selectVal = $("#seclectAppPaySetMenuName").html(),queryValue = $("#appPaySetMenuQueryVal").val();
            if(queryValue.length>0 && !/^[1-9]\d*$/.test(queryValue)){
                suixun.alert(selectVal+'格式错误！',function (data) {
                    if(data){
                        suixun.hideLoding();//隐藏加载中
                    }
                });
                return;
            }
            var param="param={";
            if(selectVal == "缴费账号"){
                param = getJsonDataNotEmpty(param,"renewalaccount",'"'+queryValue+'"');
            }else  if(selectVal == "设备IMEI号") {
                param = getJsonDataNotEmpty(param, "mdtid",'"'+queryValue+'"');
            }
            if(APPOrHJY=='和教育订单'){
                param = getJsonDataNotEmpty(param,"orderType","1");
            }
            param = getJsonDataNotEmpty(param,"pagenumber",'1');
            param = getJsonDataNotEmpty(param,"pagecount",pagecount+'');
            param += "}";
            appPaySetMenuParam = param;
            paramCurrentpage = 1;
            suixun.ajax(serverUrl+'/onlinepayManage/getRenewalOrders.json',param,"get",function(data){
                svar.state.appPaySetMenuData = [];
                suixun.hideLoding();//隐藏加载中
                if(data.code == 200){
                    for(var i=0;i<data.info.queryresult.length;i++){
                        var obj=data.info.queryresult[i];
                        svar.state.appPaySetMenuData[i] = {keyid:i,orderno:obj.orderno,mdtid:obj.mdtid,renewalaccount:obj.renewalaccount,renewalmoney:obj.renewalmoney,renewalPackage:obj.renewalPackage,renewaltime:obj.renewaltime,status:obj.status};
                    }
                    otherData.pageRight = 0;
                    if(data.info.totlepage > 1){
                        otherData.pageRight = 1;
                    }
                    otherData.pageLeft = 0;
                    totlepage = data.info.totlepage;//初始化的时候赋值：分页的当前页和总的页数
                    currentpage = 1;
                    svar.setState({appPaySetMenuData:svar.state.appPaySetMenuData,otherData:otherData});
                }else{
                    otherData.pageLeft = 0;
                    otherData.pageRight = 0;
                    totlepage = 1;//初始化的时候赋值：分页的当前页和总的页数
                    currentpage = 1;
                    svar.setState({appPaySetMenuData:svar.state.appPaySetMenuData,otherData:otherData});
                }

            });
        }else if(otherData.tableType == "5"){//促销订单一
            var seclectSchoolName = $("#seclectSchoolName").html();
            if(seclectSchoolName == "筛选学校：全部" ){
                seclectSchoolName = "";
            }
            var selectVal = $(".payPromo").html(),param="param={";
            if(selectVal == "已配送"){
                param = getJsonDataNotEmpty(param,"sendstatus","1");
            }else  if(selectVal == "未配送"){
                param = getJsonDataNotEmpty(param,"sendstatus","0");
                param = getJsonDataNotEmpty(param,"status","1");
            }else  if(selectVal == "已取消"){
                param = getJsonDataNotEmpty(param,"status","0");
            }
            param = getJsonDataNotEmpty(param,"studentname",'"'+$(".promoQueryVal").val()+'"');
            param = getJsonDataNotEmpty(param,"schoolname",'"'+seclectSchoolName+'"');

            param = getJsonDataNotEmpty(param,"pagenumber","1");
            param = getJsonDataNotEmpty(param,"pagecount",pagecount+'');
            param += "}";
            paramPromoOne = param;
            paramCurrentpage = 1;
            suixun.ajax(serverUrl+'/onlinepayManage/queryNewDiscountList.json',param,"get",function(data){
                var promoDataOne = [];
                suixun.hideLoding();//隐藏加载中
                $(".onlineCheckBox").attr("checked",false);
                $(".onlineChildCheckBox").attr("checked",false);
                if(data.code == 200){
                    for(var i=0;i<data.info.queryresult.length;i++){
                        var obj=data.info.queryresult[i];
                        promoDataOne[i] = {keyid:i,province:obj.province,status:obj.status,telephone:obj.telephone,devicepackage:obj.devicepackage,packagefee:obj.packagefee,city:obj.city,town:obj.town,id:obj.id,devicetype:obj.devicetype,paystatus:obj.paystatus,paymoney:obj.paymoney,createtime:obj.createtime,studentname:obj.studentname,classname:obj.classname,schoolname:obj.schoolname,mdtid:obj.mdtid,sendtime:obj.sendtime,orderno:obj.orderno};
                    }
                    otherData.pageRight = 0;
                    if(data.info.totlepage > 1){
                        otherData.pageRight = 1;
                    }
                    otherData.pageLeft = 0;
                    totlepage = data.info.totlepage;//初始化的时候赋值：分页的当前页和总的页数
                    currentpage = 1;
                    svar.setState({promoDataOne:promoDataOne,otherData:otherData});
                }else{
                    otherData.pageLeft = 0;
                    otherData.pageRight = 0;
                    totlepage = 1;//初始化的时候赋值：分页的当前页和总的页数
                    currentpage = 1;
                    svar.setState({promoDataOne:promoDataOne,otherData:otherData});
                }

            });
        }
    },
    /**
     * 分页
     * @param num
     */
    onPageClick: function (num) {
        //分页-调用ajac然后把数据查询出来:获取name的值
        //计算currentpage
        suixun.showLoding();//显示加载中
        var onPageLeft = 0,onPageRight = 1,svar = this;
        if(num > 0){
            currentpage = num;
        }else if(num == -1 && currentpage > 1){
            currentpage --;
        }else if(num == -2  && currentpage < totlepage){
            currentpage ++;
        }
        //修改左右的按钮
        if((currentpage == totlepage && totlepage == 1)|| totlepage == 0){
            onPageLeft = 0;
            onPageRight = 0;
        }else if(currentpage == totlepage && totlepage > 1){
            onPageLeft = 1;
            onPageRight = 0;
        }else if(1 < currentpage && currentpage < totlepage){
            onPageLeft = 1;onPageRight = 1;
        }
        svar.msgNumber();//未处理订单条数
        if(otherData.tableType == "1"){
            //执行ajax获取数据然后组装
            var selectVal = $(".payApp").html();
            var param="param={";
            if(selectVal == "已发货"){
                param = getJsonDataNotEmpty(param,"orderstatus","1");
            }else  if(selectVal == "未发货"){
                param = getJsonDataNotEmpty(param,"orderstatus","2");
                param = getJsonDataNotEmpty(param,"status","1");
            }else  if(selectVal == "已取消"){
                param = getJsonDataNotEmpty(param,"status","0");
            }
            param = getJsonDataNotEmpty(param,"peopletel",$(".appQueryVal").val());
            param = getJsonDataNotEmpty(param,"pagenumber",""+currentpage+"");
            param = getJsonDataNotEmpty(param,"pagecount",pagecount+'');
            param += "}";
            appParam = param;
            appCurrentpage = currentpage;
            suixun.ajax(serverUrl+'/onlinepayManage/queryOnlinepayList.json',param,"get",function(data){
                suixun.hideLoding();//隐藏加载中
                if(data.code == 200){
                    tableData = [];
                    for(var i=0;i<data.info.queryresult.length;i++){
                        var obj=data.info.queryresult[i];
                        var deliveryaddr = obj.deliveryaddr;
                        var peoplename = obj.peoplename;
                        if(obj.deliveryaddr != "未知" && obj.deliveryaddr != null){
                            var address = eval("["+obj.deliveryaddr+"]");
                            deliveryaddr = address[0].p+" "+address[0].c+" "+address[0].t+" "+address[0].d;
                            if(address[0].name != ""){
                                peoplename = address[0].name;
                            }
                        }
                        var payDetails = "";//购买详情
                        if(obj.smartcardnum != null && parseInt(obj.smartcardnum) > 0){
                            payDetails += "智能学生证("+obj.smartcardnum+"张)，"
                        }
                        if(obj.whitecard1num != null &&  parseInt(obj.whitecard1num) > 0){
                            payDetails += "2.4G考勤卡("+obj.whitecard1num+"张)，"
                        }
                        if(obj.whitecard2num != null &&  parseInt(obj.whitecard2num) > 0){
                            payDetails += "13.56考勤卡("+obj.whitecard2num+"张)，"
                        }
                        if(payDetails != ""){
                            payDetails = payDetails.substring(0,payDetails.length-1);
                        }
                        tableData[i] = {keyid:i,payDetails:payDetails,failReason:obj.failReason,status:obj.status,deviceid:obj.deviceid,devicetype:obj.devicetype,factory:obj.factory,paystatus:obj.paystatus,paymoney:obj.paymoney,paytime:obj.paytime,peoplename:peoplename,peopletel:obj.peopletel,deliveryaddr:deliveryaddr,mdtid:obj.mdtid,deliveryno:obj.deliveryno,sendtime:obj.sendtime,orderno:obj.orderno};
                    }
                    if(data.info.totlepage > 1 && data.info.totlepage > currentpage){
                        onPageRight = 1
                    }else{
                        onPageRight = 0;
                    }
                    otherData.pageLeft = onPageLeft;
                    otherData.pageRight = onPageRight;
                    totlepage = data.info.totlepage;//初始化的时候赋值：分页的当前页和总的页数
                    svar.setState({tableData:tableData,otherData:otherData});
                }
            });
        }else if(otherData.tableType == "2"){
            var selectVal = $(".payPromo").html(),param="param={";
            if(selectVal == "已配送"){
                param = getJsonDataNotEmpty(param,"sendstatus","1");
            }else  if(selectVal == "未配送"){
                param = getJsonDataNotEmpty(param,"sendstatus","0");
                param = getJsonDataNotEmpty(param,"status","1");
            }else  if(selectVal == "已取消"){
                param = getJsonDataNotEmpty(param,"status","0");
            }
            var seclectSchoolName = $("#seclectSchoolName").html();
            if(seclectSchoolName == "筛选学校：全部" ){
                seclectSchoolName = "";
            }
            param = getJsonDataNotEmpty(param,"studentname",$(".promoQueryVal").val());
            param = getJsonDataNotEmpty(param,"schoolname",'"'+seclectSchoolName+'"');
            param = getJsonDataNotEmpty(param,"pagenumber",'"'+currentpage+'"');
            param = getJsonDataNotEmpty(param,"pagecount",pagecount+'');
            param += "}";
            paramPromo = param;
            paramCurrentpage = currentpage;
            suixun.ajax(serverUrl+'/onlinepayManage/queryDiscountList.json',param,"get",function(data){
                promoData = [];
                suixun.hideLoding();//隐藏加载中
                $(".onlineCheckBox").attr("checked",false);
                $(".onlineChildCheckBox").attr("checked",false);
                if(data.code == 200){
                    for(var i=0;i<data.info.queryresult.length;i++){
                        var obj=data.info.queryresult[i];
                        promoData[i] = {keyid:i,province:obj.province,status:obj.status,telephone:obj.telephone,devicepackage:obj.devicepackage,packagefee:obj.packagefee,city:obj.city,town:obj.town,id:obj.id,devicetype:obj.devicetype,paystatus:obj.paystatus,paymoney:obj.paymoney,createtime:obj.createtime,studentname:obj.studentname,classname:obj.classname,schoolname:obj.schoolname,mdtid:obj.mdtid,sendtime:obj.sendtime,orderno:obj.orderno};
                    }
                    if(data.info.totlepage > 1 && data.info.totlepage > currentpage){
                        onPageRight = 1
                    }else{
                        onPageRight = 0;
                    }
                    otherData.pageLeft = onPageLeft;
                    otherData.pageRight = onPageRight;
                    totlepage = data.info.totlepage;//初始化的时候赋值：分页的当前页和总的页数
                    svar.setState({promoData:promoData,otherData:otherData});
                }else{
                    otherData.pageLeft = 0;
                    otherData.pageRight = 0;
                    totlepage = 1;//初始化的时候赋值：分页的当前页和总的页数
                    currentpage = 1;
                    svar.setState({promoData:promoData,otherData:otherData});
                }
            });
        }else if(otherData.tableType == "3"){
            var selectVal = $(".chongQPromo").html(),param="param={";
            if(selectVal == "已配送"){
                param = getJsonDataNotEmpty(param,"sendstatus","1");
            }else  if(selectVal == "未配送"){
                param = getJsonDataNotEmpty(param,"sendstatus","0");
                param = getJsonDataNotEmpty(param,"status","1");
            }else  if(selectVal == "已取消"){
                param = getJsonDataNotEmpty(param,"status","0");
            }
            param = getJsonDataNotEmpty(param,"telephone",'"'+$(".chongQQueryVal").val()+'"');
            param = getJsonDataNotEmpty(param,"pagenumber",'"'+currentpage+'"');
            param = getJsonDataNotEmpty(param,"pagecount",pagecount+'');
            param += "}";
            chongQParam = param;
            paramCurrentpage = currentpage;
            suixun.ajax(serverUrl+'/onlinepayManage/getChongqingOrders.json',param,"get",function(data){
                svar.state.ChongQDataList = [];
                suixun.hideLoding();//隐藏加载中
                if(data.code == 200){
                    for(var i=0;i<data.info.queryresult.length;i++){
                        var obj=data.info.queryresult[i];
                        var payDetails = "智能学生证";//购买详情
                        svar.state.ChongQDataList[i] = {keyid:i,payDetails:payDetails,smspush:obj.smspush,paystatus:obj.paystatus,orderno:obj.orderno,paymoney:obj.paymoney,createtime:obj.createtime,studentname:obj.studentname,classname:obj.classname,schoolname:obj.schoolname,mdtid:obj.mdtid,sendtime:obj.sendtime,telephone:obj.telephone,status:obj.status};
                    }
                    if(data.info.totlepage > 1 && data.info.totlepage > currentpage){
                        onPageRight = 1
                    }else{
                        onPageRight = 0;
                    }
                    otherData.pageLeft = onPageLeft;
                    otherData.pageRight = onPageRight;
                    totlepage = data.info.totlepage;//初始化的时候赋值：分页的当前页和总的页数
                    svar.setState({ChongQDataList:svar.state.ChongQDataList,otherData:otherData});
                }else{
                    otherData.pageLeft = 0;
                    otherData.pageRight = 0;
                    totlepage = 1;//初始化的时候赋值：分页的当前页和总的页数
                    currentpage = 1;
                    svar.setState({ChongQDataList:svar.state.ChongQDataList,otherData:otherData});
                }

            });
        }else if(otherData.tableType == "4"){//缴费订单
            var selectVal = $("#seclectAppPaySetMenuName").html(),queryValue = $("#appPaySetMenuQueryVal").val();
            if(queryValue.length>0 && !/^[1-9]\d*$/.test(queryValue)){
                suixun.alert(selectVal+'格式错误！',function (data) {
                    if(data){
                        suixun.hideLoding();//隐藏加载中
                    }
                });
                return;
            }
            var param="param={";
            if(selectVal == "缴费账号"){
                param = getJsonDataNotEmpty(param,"renewalaccount",'"'+queryValue+'"');
            }else  if(selectVal == "设备IMEI号") {
                param = getJsonDataNotEmpty(param, "mdtid",'"'+queryValue+'"');
            }
            param = getJsonDataNotEmpty(param,"pagenumber",'"'+currentpage+'"');
            param = getJsonDataNotEmpty(param,"pagecount",pagecount+'');
            param += "}";
            appPaySetMenuParam = param;
            paramCurrentpage = currentpage;
            suixun.ajax(serverUrl+'/onlinepayManage/getRenewalOrders.json',param,"get",function(data){
                svar.state.appPaySetMenuData = [];
                suixun.hideLoding();//隐藏加载中
                if(data.code == 200){
                    for(var i=0;i<data.info.queryresult.length;i++){
                        var obj=data.info.queryresult[i];
                        svar.state.appPaySetMenuData[i] = {keyid:i,orderno:obj.orderno,mdtid:obj.mdtid,renewalaccount:obj.renewalaccount,renewalmoney:obj.renewalmoney,renewalPackage:obj.renewalPackage,renewaltime:obj.renewaltime,status:obj.status};
                    }
                    if(data.info.totlepage > 1 && data.info.totlepage > currentpage){
                        onPageRight = 1
                    }else{
                        onPageRight = 0;
                    }
                    otherData.pageLeft = onPageLeft;
                    otherData.pageRight = onPageRight;
                    totlepage = data.info.totlepage;//初始化的时候赋值：分页的当前页和总的页数
                    svar.setState({appPaySetMenuData:svar.state.appPaySetMenuData,otherData:otherData});
                }else{
                    otherData.pageLeft = 0;
                    otherData.pageRight = 0;
                    totlepage = 1;//初始化的时候赋值：分页的当前页和总的页数
                    currentpage = 1;
                    svar.setState({appPaySetMenuData:svar.state.appPaySetMenuData,otherData:otherData});
                }

            });
        }else if(otherData.tableType == "5"){//促销订单一
            var selectVal = $(".payPromo").html(),param="param={";
            if(selectVal == "已配送"){
                param = getJsonDataNotEmpty(param,"sendstatus","1");
            }else  if(selectVal == "未配送"){
                param = getJsonDataNotEmpty(param,"sendstatus","0");
                param = getJsonDataNotEmpty(param,"status","1");
            }else  if(selectVal == "已取消"){
                param = getJsonDataNotEmpty(param,"status","0");
            }
            var seclectSchoolName = $("#seclectSchoolName").html();
            if(seclectSchoolName == "筛选学校：全部" ){
                seclectSchoolName = "";
            }
            param = getJsonDataNotEmpty(param,"studentname",$(".promoQueryVal").val());
            param = getJsonDataNotEmpty(param,"schoolname",'"'+seclectSchoolName+'"');
            param = getJsonDataNotEmpty(param,"pagenumber",'"'+currentpage+'"');
            param = getJsonDataNotEmpty(param,"pagecount",pagecount+'');
            param += "}";
            paramPromoOne = param;
            paramCurrentpage = currentpage;
            suixun.ajax(serverUrl+'/onlinepayManage/queryNewDiscountList.json',param,"get",function(data){
                var promoDataOne = [];
                suixun.hideLoding();//隐藏加载中
                $(".onlineCheckBox").attr("checked",false);
                $(".onlineChildCheckBox").attr("checked",false);
                if(data.code == 200){
                    for(var i=0;i<data.info.queryresult.length;i++){
                        var obj=data.info.queryresult[i];
                        promoDataOne[i] = {keyid:i,province:obj.province,status:obj.status,telephone:obj.telephone,devicepackage:obj.devicepackage,packagefee:obj.packagefee,city:obj.city,town:obj.town,id:obj.id,devicetype:obj.devicetype,paystatus:obj.paystatus,paymoney:obj.paymoney,createtime:obj.createtime,studentname:obj.studentname,classname:obj.classname,schoolname:obj.schoolname,mdtid:obj.mdtid,sendtime:obj.sendtime,orderno:obj.orderno};
                    }
                    if(data.info.totlepage > 1 && data.info.totlepage > currentpage){
                        onPageRight = 1
                    }else{
                        onPageRight = 0;
                    }
                    otherData.pageLeft = onPageLeft;
                    otherData.pageRight = onPageRight;
                    totlepage = data.info.totlepage;//初始化的时候赋值：分页的当前页和总的页数
                    svar.setState({promoDataOne:promoDataOne,otherData:otherData});
                }else{
                    otherData.pageLeft = 0;
                    otherData.pageRight = 0;
                    totlepage = 1;//初始化的时候赋值：分页的当前页和总的页数
                    currentpage = 1;
                    svar.setState({promoDataOne:promoDataOne,otherData:otherData});
                }
            });
        }
    },
    //点击发货
    onClickDeliverGoods: function (infos) {
        //设置先关的值
        $(".popModel-orderno").html(infos[0]);//id编号
        $(".popModel-devicetype").html(infos[1]);//设备类型
        $(".popModel-peoplename").html(infos[2]);//联系人
        $(".popModel-peopletel").html(infos[3]);//联系电话
        $(".appPopExport").show();
    },
    /**
     * 购买订单-取消发货（退款）
     */
    onClickCloseDeliverGoods: function (orderno) {
        var svar = this;
        var param="param={";
        param = getJsonDataNotEmpty(param,"orderno", '"'+orderno+'"');
        param += "}";
        suixun.confirm_noTit("确定要退款吗？",function (data) {
            if(data){
                suixun.showLoding();//显示加载中
                suixun.ajax(serverUrl+'/onlinepayManage/refund.json',param,"get",function(data){
                    suixun.hideLoding();//隐藏加载中
                    if(data.code == 200){
                        //调用ajax去查询发货
                        suixun.alert("退款操作成功！",function (data) {
                            if(data){
                                svar.onPageClick(currentpage);//更新数据
                            }
                        });
                    }else{
                        suixun.alert(data.msg)
                    }
                });
            }
        });
    },
    /**
     * 点击配送
     * @param infos
     */
    onClickDeliverGoodsPromo: function (infos) {
        $(".promoPopModel-devicetype").html(infos[0]);//设备类型
        $(".promoPopModel-schoolName").html(infos[1]);//学校
        $(".promoPopModel-stdClass").html(infos[2]);//班级
        $(".promoPopModel-stdName").html(infos[3]);//学生
        $(".promoPopModelId").html(infos[4]);//订单号
        if(infos[5] == null){
            $(".promoPopModel-province").html("");//省
        }else{
            $(".promoPopModel-province").html(infos[5]+" "+infos[6]+" "+infos[7]);//省
        }
        $("#discountOrderTime").val("");//配送时间
        $(".export-promoImei").val("");//imei号
        $(".promoPopExport").show();
    },
    /**
     * 点击取消订单
     * @param orderno
     */
    onClickCloseOrderPromo: function (orderno) {
        var svar = this;
        var param="param={";
        param = getJsonDataNotEmpty(param,"orderno", '"'+orderno+'"');
        param += "}";
        suixun.confirm_noTit("是否确定取消该订单？",function (data) {
            if(data){
                suixun.showLoding();//显示加载中
                var url = serverUrl+'/onlinepayManage/cancelDiscount.json';
                if(otherData.tableType==5){
                    url = serverUrl+'/onlinepayManage/cancelNewDiscount.json';
                }
                suixun.ajax(url,param,"get",function(data){
                    suixun.hideLoding();//隐藏加载中
                    if(data.code == 200){
                        //调用ajax去查询发货
                        suixun.alert("取消订单成功！",function (data) {
                            if(data){
                                svar.onPageClick(currentpage);//更新数据
                            }
                        });
                    }else{
                        suixun.alert(data.msg)
                    }
                });
            }
        });
    },
    //导出excel
    onClickExport: function () {
        suixun.confirm_noTit("是否确定导出Excel？",function (data) {
            if(data){
                if(otherData.tableType == "1"){//app订单
                    var selectVal = $(".payApp").html(),
                        APPOrHJY = $(".APP-select-HJY-value").html();
                    var param="param={";
                    param = getJsonDataNotEmpty(param,"peopletel",'"'+$(".appQueryVal").val()+'"');
                    param = getJsonDataNotEmpty(param,"factory",'"'+selectVal=="按条件筛选"?"":selectVal=="全部"?"":selectVal+'"');
                    if(APPOrHJY=='和教育订单'){
                        param = getJsonDataNotEmpty(param,"orderType","1");
                    }
                    param += "}";
                    window.location.href = serverUrl+'/onlinepayManage/export_OnlinepayList.json?'+param;
                }else if(otherData.tableType == "2"){//优惠订单
                    var seclectSchoolName = $("#seclectSchoolName").html();
                    if(seclectSchoolName == "筛选学校：全部" ){
                        seclectSchoolName = "";
                    }
                    var selectVal = $(".payPromo").html(),param="param={";
                    if(selectVal == "已配送"){
                        param = getJsonDataNotEmpty(param,"sendstatus","1");
                    }else  if(selectVal == "未配送"){
                        param = getJsonDataNotEmpty(param,"sendstatus","0");
                        param = getJsonDataNotEmpty(param,"status","1");
                    }else  if(selectVal == "已取消"){
                        param = getJsonDataNotEmpty(param,"status","0");
                    }
                    param = getJsonDataNotEmpty(param,"studentname",'"'+$(".promoQueryVal").val()+'"');
                    param = getJsonDataNotEmpty(param,"schoolname",'"'+seclectSchoolName+'"');
                    param += "}";
                    window.location.href = serverUrl+'/onlinepayManage/export_discountList.json?'+param;
                }else if(otherData.tableType == "3"){//重庆订单
                    var selectVal = $(".chongQPromo").html(),param="param={";
                    if(selectVal == "已配送"){
                        param = getJsonDataNotEmpty(param,"sendstatus","1");
                    }else  if(selectVal == "未配送"){
                        param = getJsonDataNotEmpty(param,"sendstatus","0");
                        param = getJsonDataNotEmpty(param,"status","1");
                    }else  if(selectVal == "已取消"){
                        param = getJsonDataNotEmpty(param,"status","0");
                    }
                    param = getJsonDataNotEmpty(param,"telephone",'"'+$(".chongQQueryVal").val()+'"');
                    param += "}";
                    window.location.href = serverUrl+'/onlinepayManage/export_chongqingOrders.json?'+param;
                }else if(otherData.tableType == "4"){//缴费订单
                    var selectVal = $("#seclectAppPaySetMenuName").html(),
                        APPOrHJY = $(".APP-select-HJY-two-value").html(),
                        queryValue = $("#appPaySetMenuQueryVal").val();
                    if(queryValue.length>0 && !/^[1-9]\d*$/.test(queryValue)){
                        suixun.alert(selectVal+'格式错误！',function (data) {
                            if(data){
                                suixun.hideLoding();//隐藏加载中
                            }
                        });
                        return;
                    }
                    var param="param={";
                    if(selectVal == "缴费账号"){
                        param = getJsonDataNotEmpty(param,"renewalaccount",'"'+queryValue+'"');
                    }else  if(selectVal == "设备IMEI号") {
                        param = getJsonDataNotEmpty(param, "mdtid",'"'+queryValue+'"');
                    }
                    if(APPOrHJY=='和教育订单'){
                        param = getJsonDataNotEmpty(param,"orderType","1");
                    }
                    param += "}";
                    window.location.href = serverUrl+'/onlinepayManage/export_renewalOrders.json?'+param;
                }else if(otherData.tableType == "5"){//优惠订单1
                    var seclectSchoolName = $("#seclectSchoolName").html();
                    if(seclectSchoolName == "筛选学校：全部" ){
                        seclectSchoolName = "";
                    }
                    var selectVal = $(".payPromo").html(),param="param={";
                    if(selectVal == "已配送"){
                        param = getJsonDataNotEmpty(param,"sendstatus","1");
                    }else  if(selectVal == "未配送"){
                        param = getJsonDataNotEmpty(param,"sendstatus","0");
                        param = getJsonDataNotEmpty(param,"status","1");
                    }else  if(selectVal == "已取消"){
                        param = getJsonDataNotEmpty(param,"status","0");
                    }
                    param = getJsonDataNotEmpty(param,"studentname",'"'+$(".promoQueryVal").val()+'"');
                    param = getJsonDataNotEmpty(param,"schoolname",'"'+seclectSchoolName+'"');
                    param += "}";
                    window.location.href = serverUrl+'/onlinepayManage/export_NewDiscountList.json?'+param;
                }
            }
        });
    },
    /**
     * 点击筛选列表-app购买
     * @param val
     */
    onClickSelectFactory: function (val) {
        $(".payApp").html(val);//设置值
        this.onClickQuery();//调用查询条件
        $(".drop-down").slideUp();
    },
    /**
     * 和教育、app购买
     * @param val
     */
    changeOrderType: function (val,type) {
        if(type==1){
            $(".APP-select-HJY-value").html(val);//设置值
        }else{
            $(".APP-select-HJY-two-value").html(val);//设置值
        }
        this.onClickQuery();//调用查询条件
        $(".drop-down").slideUp();
    },
    /**
     *点击筛选列表-促销购买
     * @param val
     */
    onClickSelectFactoryPromo: function (val) {
        $(".payPromo").html(val);//设置值
        this.onClickQuery();//调用查询条件
        $(".drop-down").slideUp();
    },
    /**
     *点击筛选列表-重庆促销购买
     * @param val
     */
    onClickSelectFactoryPromoChongQ: function (val) {
        $(".chongQPromo").html(val);//设置值
        this.onClickQuery();//调用查询条件
        $(".drop-down").slideUp();
    },
    /**
     * 关闭发货弹出层
     */
    onClickHidePop: function () {
        $(".popModel").hide();//发货、配送
        $(".popSeleteImei").hide();//查询原卡信息
        $(".errorMsg").hide();
    },
    /**
     * 点击下拉框时候改变样式
     */
    onChangeOption: function () {
        var exportFactory = $(".export-factory option:selected").val();
        if(exportFactory == "请选择生产商"){
            $(".export-factory").css("color","#999999");
        }else{
            $(".export-factory").css("color","#000000");
        }
    },
    /**
     * 弹出层输入框失去焦点
     * @param e
     */
    onBlurInput: function (e) {
        var exportImei = $(e.target).val();
        if(exportImei == ""){
            $("."+$(e.target).attr("data-error")).show();
        }else{
            $("."+$(e.target).attr("data-error")).hide();
        }
    },
    /**
     * 点击确定发货
     */
    onClockDeliverGoodsOK: function () {
        //验证生产商
        var svar = this;
        var exportFactory = $(".export-factory option:selected").val();
//                if(exportFactory == "请选择生产商"){
//                    suixun.alert("生产商不能为空!");
//                    return;
//                }
        var exportImei = $(".export-imei").val();
        var exportCompany = $(".export-company").val();
        var exportDeliveryno = $(".export-deliveryno").val();
        if(exportImei == ""){
            suixun.alert("设备IMEI号不能为空!");
            $(".imei-error").show();
            return;
        }else{
            exportImei = exportImei.replace(/,/g,'\\n').replace(/，/g,'\\n');
            if(exportImei.lastIndexOf('\\n') == exportImei.length-2){
                exportImei = exportImei.substring(0,exportImei.length-2)
            }
        }
        if(exportCompany == ""){
            suixun.alert("快递公司不能为空!");
            $(".company-error").show();
            return;
        }
        if(exportDeliveryno == ""){
            suixun.alert("快递单号不能为空!");
            $(".deliveryno-error").show();
            return;
        }else if(!/^[1-9]\d*$/.test(exportDeliveryno)){
            suixun.alert("快递单号格式错误!");
            $(".deliveryno-error").show();
            return;
        }
        suixun.showLoding();//显示加载中
        var param="param={";
//                param = getJsonDataNotEmpty(param,"factory",""+exportFactory+"");
        param = getJsonDataNotEmpty(param,"mdtid",'"'+exportImei+'"');
        param += "}";
        suixun.ajax(serverUrl+'/validateIMEI.json',param,"get",function(data){
            suixun.hideLoding();//隐藏加载中
            if(data.code == 200){
                //调用ajax去查询发货
                suixun.showLoding();//显示加载中
                param="param={";
                param = getJsonDataNotEmpty(param,"orderno", ''+$(".popModel-orderno").html()+'');
                param = getJsonDataNotEmpty(param,"deliverycompany",''+exportCompany+'');
                param = getJsonDataNotEmpty(param,"deliveryno",""+exportDeliveryno+"");
                param = getJsonDataNotEmpty(param,"mdtid",'"'+exportImei+'"');
                param += "}";
                suixun.ajax(serverUrl+'/onlinepayManage/sendDevice.json',param,"get",function(data){
                    suixun.hideLoding(200);//隐藏加载中
                    if(data.code == 200){
                        if(data.info.resultinfo =="成功"){
                            suixun.alert("发货成功!",function (data) {
                                if(data){
                                    svar.onPageClick(currentpage);//更新数据
                                    svar.onClickHidePop();//关闭窗口
                                    $(".export-factory").val("请选择生产商");//下拉列表
                                    $(".export-imei").val("");//imei
                                    $(".export-company").val("");//快递公司
                                    $(".export-deliveryno").val("");//快递编号
                                }
                            });
                        }else{
                            suixun.alert("发货失败!");
                        }
                    }
                });
            }else{
                suixun.alert(data.msg)
            }
        });
    },
    /**
     * app订单-查询已发货的imei号
     * @param phoneNumber
     */
    onClickSeleteImei: function (phoneNumber) {
        //popSeleteImei-address popModel-peopletel popSeleteImei-name popSeleteImei-imei
        suixun.showLoding();//显示加载中
        var param="param={";
        param = getJsonDataNotEmpty(param,"parentphone",""+phoneNumber+"");
        param += "}";
        suixun.ajax(serverUrl+'/parentInfoManage/queryParentList.json?'+param,'',"get",function(data){
            suixun.hideLoding();//隐藏加载中
            if(data.code == 200){
                for(var i=0;i<data.info.queryresult.length;i++){
                    var obj=data.info.queryresult[i];
                    $(".popSeleteImei-address").html(obj.homeaddr);
                    $(".popModel-peopletel").html(obj.peopleidcard);
                    $(".popSeleteImei-name").html(obj.peoplename);
                    $(".popSeleteImei-imei").html(obj.mdtid);
                }
                $(".popSeleteImei").show();
            }
        });
    },
    /**
     * 验证输入框的长度
     * @returns {XML}
     */
    onInputNumber:function (e) {
        var value = e.target.value;
        if(value.length > 11){
            $(e.target).val(value.slice(0,11));
        }
    },
    /**
     * 切换订单列表
     * @returns {XML}
     */
    onClickShowOrder: function (e) {
        var svar = this;
        suixun.showLoding();//显示加载中
        svar.msgNumber();//未处理订单条数
        if($(e.target).attr("data-orderType")=="1"){
            if(appParam == ""){
                appParam = 'param={"pagenumber":"'+currentpage+'","pagecount":"'+pagecount+'"}';
            }else{
                appParam = appParam.replace("pagecount:"+pageNumberOld,"pagecount:"+pagecount);
                pageNumberOld = pagecount;
            }
            suixun.ajax(serverUrl+'/onlinepayManage/queryOnlinepayList.json',appParam,"get",function(data){
                suixun.hideLoding();//隐藏加载中
                if(data.code == 200){
                    tableData = [];
                    for(var i=0;i<data.info.queryresult.length;i++){
                        var obj=data.info.queryresult[i];
                        var deliveryaddr = obj.deliveryaddr;
                        var peoplename = obj.peoplename;
                        if(obj.deliveryaddr != "未知" && obj.deliveryaddr != null){
                            var address = eval("["+obj.deliveryaddr+"]");
                            deliveryaddr = address[0].p+" "+address[0].c+" "+address[0].t+" "+address[0].d;
                            if(address[0].name != ""){
                                peoplename = address[0].name;
                            }
                        }
                        var payDetails = "";//购买详情
                        if(obj.smartcardnum != null && parseInt(obj.smartcardnum) > 0){
                            payDetails += "智能学生证("+obj.smartcardnum+"张)，"
                        }
                        if(obj.whitecard1num != null &&  parseInt(obj.whitecard1num) > 0){
                            payDetails += "2.4G考勤卡("+obj.whitecard1num+"张)，"
                        }
                        if(obj.whitecard2num != null &&  parseInt(obj.whitecard2num) > 0){
                            payDetails += "13.56考勤卡("+obj.whitecard2num+"张)，"
                        }
                        if(payDetails != ""){
                            payDetails = payDetails.substring(0,payDetails.length-1);
                        }
                        tableData[i] = {keyid:i,payDetails:payDetails,failReason:obj.failReason,status:obj.status,devicetype:obj.devicetype,factory:obj.factory,paystatus:obj.paystatus,paymoney:obj.paymoney,paytime:obj.paytime,peoplename:peoplename,peopletel:obj.peopletel,deliveryaddr:deliveryaddr,mdtid:obj.mdtid,deliveryno:obj.deliveryno,sendtime:obj.sendtime,orderno:obj.orderno};
                    }
                    if(data.info.totlepage > 1){
                        otherData.pageRight = 1;
                    }else{
                        otherData.pageRight = 0;
                    }
                    if(appCurrentpage > 1 && data.info.totlepage > appCurrentpage){
                        otherData.pageLeft = 1;
                    }else{
                        otherData.pageLeft = 0;
                    }
                    otherData.tableType = "1";
                    currentpage = appCurrentpage;totlepage = data.info.totlepage;//初始化的时候赋值：分页的当前页和总的页数
                    svar.setState({tableData:tableData,otherData:otherData});
                }

            });
        }else if($(e.target).attr("data-orderType")=="2"){
            this.querySchool(2);//查询未配送的学校
            if(paramPromo == ""){
                paramPromo = 'param={"pagenumber":"'+currentpage+'",pagecount:"'+pagecount+'"}';
            }else{
                paramPromo = paramPromo.replace("pagecount:"+pageNumberOld,"pagecount:"+pagecount);
                pageNumberOld = pagecount;
            }
            suixun.ajax(serverUrl+'/onlinepayManage/queryDiscountList.json',paramPromo,"get",function(data){
                suixun.hideLoding();//隐藏加载中
                $(".onlineCheckBox").attr("checked",false);
                $(".onlineChildCheckBox").attr("checked",false);
                promoData = [];
                if(data.code == 200){
                    if(data.info.queryresult != null){
                        for(var i=0;i<data.info.queryresult.length;i++){
                            var obj=data.info.queryresult[i];
                            promoData[i] = {keyid:i,province:obj.province,status:obj.status,telephone:obj.telephone,devicepackage:obj.devicepackage,packagefee:obj.packagefee,city:obj.city,town:obj.town,id:obj.id,devicetype:obj.devicetype,paystatus:obj.paystatus,paymoney:obj.paymoney,createtime:obj.createtime,studentname:obj.studentname,classname:obj.classname,schoolname:obj.schoolname,mdtid:obj.mdtid,sendtime:obj.sendtime,orderno:obj.orderno};
                        }
                        if(data.info.totlepage > 1){
                            otherData.pageRight = 1;
                        }else{
                            otherData.pageRight = 0;
                        }
                        if(paramCurrentpage > 1 && data.info.totlepage > paramCurrentpage){
                            otherData.pageLeft = 1;
                        }else{
                            otherData.pageLeft = 0;
                        }
                        otherData.tableType = "2";
                        currentpage = paramCurrentpage;totlepage = data.info.totlepage;//初始化的时候赋值：分页的当前页和总的页数
                        svar.setState({promoData:promoData,otherData:otherData});
                    }else{
                        otherData.pageRight = 0;
                        otherData.pageRight = 0;
                        otherData.tableType = "2";
                        currentpage = paramCurrentpage;totlepage = 1;//初始化的时候赋值：分页的当前页和总的页数
                        svar.setState({promoData:promoData,otherData:otherData});
                    }
                }else{
                    promoNum = 0;
                    otherData.pageRight = 0;
                    otherData.pageRight = 0;
                    otherData.tableType = "2";
                    currentpage = paramCurrentpage;totlepage = 1;//初始化的时候赋值：分页的当前页和总的页数
                    svar.setState({promoData:promoData,otherData:otherData});
                }
            });
        }else if($(e.target).attr("data-orderType")=="3"){//重庆订单
            if(chongQParam == ""){
                chongQParam = 'param={"pagenumber":"'+currentpage+'","pagecount":"'+pagecount+'"}';
            }else{
                chongQParam = chongQParam.replace("pagecount:"+pageNumberOld,"pagecount:"+pagecount);
                pageNumberOld = pagecount;
            }
            suixun.ajax(serverUrl+'/onlinepayManage/getChongqingOrders.json',chongQParam,"get",function(data){
                svar.state.ChongQDataList = [];
                suixun.hideLoding();//隐藏加载中
                if(data.code == 200){
                    for(var i=0;i<data.info.queryresult.length;i++){
                        var obj=data.info.queryresult[i];
                        var payDetails = "智能学生证";//购买详情
                        svar.state.ChongQDataList[i] = {keyid:i,payDetails:payDetails,smspush:obj.smspush,paystatus:obj.paystatus,orderno:obj.orderno,paymoney:obj.paymoney,createtime:obj.createtime,studentname:obj.studentname,classname:obj.classname,schoolname:obj.schoolname,mdtid:obj.mdtid,sendtime:obj.sendtime,telephone:obj.telephone,status:obj.status};
                    }
                    if(data.info.totlepage > 1){
                        otherData.pageRight = 1;
                    }else{
                        otherData.pageRight = 0;
                    }
                    if(paramCurrentpage > 1 && data.info.totlepage > paramCurrentpage){
                        otherData.pageLeft = 1;
                    }else{
                        otherData.pageLeft = 0;
                    }
                    otherData.tableType = "3";
                    currentpage = paramCurrentpage;totlepage = data.info.totlepage;//初始化的时候赋值：分页的当前页和总的页数
                    svar.setState({ChongQDataList:svar.state.ChongQDataList,otherData:otherData});
                }else{
                    otherData.tableType = "3";
                    otherData.pageLeft = 0;
                    otherData.pageRight = 0;
                    totlepage = 1;//初始化的时候赋值：分页的当前页和总的页数
                    currentpage = 1;
                    svar.setState({ChongQDataList:svar.state.ChongQDataList,otherData:otherData});
                }
            });
        }else if($(e.target).attr("data-orderType")=="4"){//缴费订单
            if(appPaySetMenuParam == ""){
                appPaySetMenuParam = 'param={"pagenumber":"'+currentpage+'","pagecount":"'+pagecount+'"}';
            }else{
                appPaySetMenuParam = appPaySetMenuParam.replace("pagecount:"+pageNumberOld,"pagecount:"+pagecount);
                pageNumberOld = pagecount;
            }
            suixun.ajax(serverUrl+'/onlinepayManage/getRenewalOrders.json',appPaySetMenuParam,"get",function(data){
                svar.state.appPaySetMenuData = [];
                suixun.hideLoding();//隐藏加载中
                if(data.code == 200){
                    for(var i=0;i<data.info.queryresult.length;i++){
                        var obj=data.info.queryresult[i];
                        svar.state.appPaySetMenuData[i] = {keyid:i,orderno:obj.orderno,mdtid:obj.mdtid,renewalaccount:obj.renewalaccount,renewalmoney:obj.renewalmoney,renewalPackage:obj.renewalPackage,renewaltime:obj.renewaltime,status:obj.status};
                    }
                    if(data.info.totlepage > 1){
                        otherData.pageRight = 1;
                    }else{
                        otherData.pageRight = 0;
                    }
                    if(paramCurrentpage > 1 && data.info.totlepage > paramCurrentpage){
                        otherData.pageLeft = 1;
                    }else{
                        otherData.pageLeft = 0;
                    }
                    otherData.tableType = "4";
                    currentpage = paramCurrentpage;totlepage = data.info.totlepage;//初始化的时候赋值：分页的当前页和总的页数
                    svar.setState({appPaySetMenuData:svar.state.appPaySetMenuData,otherData:otherData});
                }else{
                    otherData.tableType = "4";
                    otherData.pageLeft = 0;
                    otherData.pageRight = 0;
                    totlepage = 1;//初始化的时候赋值：分页的当前页和总的页数
                    currentpage = 1;
                    svar.setState({appPaySetMenuData:svar.state.appPaySetMenuData,otherData:otherData});
                }
            });
        }else if($(e.target).attr("data-orderType")=="5") {//优惠订单一
            this.querySchool(5);//查询未配送的学校
            if (paramPromoOne == "") {
                paramPromoOne = 'param={"pagenumber":"' + currentpage + '",pagecount:"' + pagecount + '"}';
            } else {
                paramPromoOne = paramPromoOne.replace("pagecount:" + pageNumberOld, "pagecount:" + pagecount);
                pageNumberOld = pagecount;
            }
            suixun.ajax(serverUrl + '/onlinepayManage/queryNewDiscountList.json', paramPromoOne, "get", function (data) {
                suixun.hideLoding();//隐藏加载中
                $(".onlineCheckBox").attr("checked", false);
                $(".onlineChildCheckBox").attr("checked", false);
                var promoDataOne = [];
                if (data.code == 200) {
                    if (data.info.queryresult != null) {
                        for (var i = 0; i < data.info.queryresult.length; i++) {
                            var obj = data.info.queryresult[i];
                            promoDataOne[i] = {
                                keyid: i,
                                status: obj.status,
                                province: obj.province,
                                telephone: obj.telephone,
                                devicepackage: obj.devicepackage,
                                packagefee: obj.packagefee,
                                city: obj.city,
                                town: obj.town,
                                id: obj.id,
                                devicetype: obj.devicetype,
                                paystatus: obj.paystatus,
                                paymoney: obj.paymoney,
                                createtime: obj.createtime,
                                studentname: obj.studentname,
                                classname: obj.classname,
                                schoolname: obj.schoolname,
                                mdtid: obj.mdtid,
                                sendtime: obj.sendtime,
                                orderno: obj.orderno
                            };
                        }
                        if (data.info.totlepage > 1) {
                            otherData.pageRight = 1;
                        } else {
                            otherData.pageRight = 0;
                        }
                        if (paramCurrentpage > 1 && data.info.totlepage > paramCurrentpage) {
                            otherData.pageLeft = 1;
                        } else {
                            otherData.pageLeft = 0;
                        }
                        otherData.tableType = "5";
                        currentpage = paramCurrentpage;
                        totlepage = data.info.totlepage;//初始化的时候赋值：分页的当前页和总的页数
                        svar.setState({promoDataOne: promoDataOne, otherData: otherData});
                    } else {
                        otherData.pageRight = 0;
                        otherData.pageRight = 0;
                        otherData.tableType = "5";
                        currentpage = paramCurrentpage;
                        totlepage = 1;//初始化的时候赋值：分页的当前页和总的页数
                        svar.setState({promoDataOne: promoDataOne, otherData: otherData});
                    }
                } else {
                    promoNum = 0;
                    otherData.pageRight = 0;
                    otherData.pageRight = 0;
                    otherData.tableType = "5";
                    currentpage = paramCurrentpage;
                    totlepage = 1;//初始化的时候赋值：分页的当前页和总的页数
                    svar.setState({promoDataOne: promoDataOne, otherData: otherData});
                }
            });
        }
    },
    /**
     * 配送-促销订单
     */
    onClockDeliverGoodsPromoOK: function () {
        var promoPopModelId = $(".promoPopModelId").html(),//订单号
            sendtime = $("#schoolOrderNumberPromoTime").val();//配送时间
        if(sendtime == ""){
            suixun.alert("配送时间不能为空!");
            return;
        }
        var param="param={";
        param = getJsonDataNotEmpty(param,"sendtime",'"'+sendtime+'"');
        param = getJsonDataNotEmpty(param,"orderno",'"'+promoPopModelId+'"');
        param += "}";
        this.deliveryRequest(param);
    },
    /**
     * 配送请求
     * @param param
     */
    deliveryRequest: function (param) {
        suixun.showLoding();//显示加载中
        var svar = this;
        var url = serverUrl+'/onlinepayManage/sendDiscountDevice.json';
        if(otherData.tableType==5){
            url = serverUrl+'/onlinepayManage/sendNewDiscountDevice.json';
        }
        suixun.ajax(url,param,"get",function(data){
            suixun.hideLoding(200);//隐藏加载中
            if(data.code == 200){
                svar.onPageClick(currentpage);//更新数据
                suixun.alert("配送成功!",function (data) {
                    if(data){
                        svar.onClickHidePop();//关闭窗口
                        $("#schoolOrderNumberPromoTime").val("");//配送时间
                    }
                });
            }else{
                suixun.alert(data.msg);
            }
        });
    },
    /**
     * 筛选学校
     * @param info
     * @returns {XML}
     */
    onClickSelectSchool: function (info) {
        $("#seclectSchoolName").html(info);
        this.onClickQuery();//调用查询条件
    },
    /**
     * 点击限时优惠订单 checkbox
     * @returns {XML}
     */
    onlineChildCheckBox: function () {
        if($(".onlineCheckBox").is(":checked")){
            $(".onlineChildCheckBox").prop("checked",true);
        }else{
            $(".onlineChildCheckBox").attr("checked",false);
        }
    },
    /**
     * 按学校配送
     * @returns {XML}
     */
    schoolDelivery: function () {
        $(".school-orderNumber").html(0);
        $("#pop-schoolName").val("");
        $(".schoolDistribution-button").removeClass(" noClick").addClass(" noClick");
        $(".schoolDistribution").show();
    },
    /**
     * 批量配送
     * @returns {XML}
     */
    batchDelivery: function () {
        var orderList="",num = 0;
        $(".onlineChildCheckBox").each(function(i,box) {
            if(box!=null && box.checked){
                num++;
                orderList += $(box).attr("data-value")+"|";
            }
        });

        if(orderList.length>1){
            orderList = orderList.substring(0,orderList.length-1);
        }else{
            suixun.alert("请先选择要配送的订单");
            return false;
        }
        $("#batchDelivery_orderList").val(orderList);
        $(".batchDelivery-orderNumber").html(num);
        $("#batchDeliveryTime").val('');
        $(".popBatchDelivery").show();
    },
    /**
     * 批量配送-配送
     */
    onClockBatchDeliverGoodsPromoOK: function () {
        var sendtime = $("#batchDeliveryTime").val();
        if(sendtime == ""){
            suixun.alert("配送时间不能为空！");
            return;
        }
        var param="param={";
        param = getJsonDataNotEmpty(param,"sendtime",'"'+sendtime+'"');
        param = getJsonDataNotEmpty(param,"orderno",'"'+$("#batchDelivery_orderList").val()+'"');
        param += "}";
        this.deliveryRequest(param);
    },
    /**
     * 按照学校配送
     */
    onClockSchoolDeliverGoodsPromoOK: function () {
        var schoolName = $("#pop-schoolName").val();
        var sendtime = $("#schoolOrderNumberPromoTime").val();
        if($(".school-orderNumber").html() == "0"){
            return;
        }
        if(schoolName == ""){
            suixun.alert("配送学校不能为空！");
            return;
        }
        if(sendtime == ""){
            suixun.alert("配送时间不能为空！");
            return;
        }
        var param="param={";
        param = getJsonDataNotEmpty(param,"sendtime",'"'+sendtime+'"');
        param = getJsonDataNotEmpty(param,"schoolname",'"'+schoolName+'"');
        param += "}";
        this.deliveryRequest(param);
    },
    /**
     * 点击按学校配送学校输入框
     * @param e
     */
    onClickSchool: function (e) {
        $("."+$(e.target).attr("data-list")+"").show();
    },
    /**
     * 点击弹出层未配送学校名称
     * @returns {XML}
     */
    onClickPopSchoolName: function (e) {
        var schoolName = e.target.innerHTML;
        var param="param={";
        param = getJsonDataNotEmpty(param,"schoolname",'"'+schoolName+'"');
        param += "}";
        suixun.showLoding();//显示加载中
        var url = serverUrl+'/onlinepayManage/getordercounts.json';
        if(otherData.tableType==5){
            url = serverUrl+'/onlinepayManage/getnewordercounts.json';
        }
        suixun.ajax(url,param,"get",function(data){
            suixun.hideLoding(200);//隐藏加载中
            if(data.code == 200){
                if(data.info.count == 0){
                    $(".schoolDistribution-button").addClass(" noClick");
                }else{
                    $(".schoolDistribution-button").removeClass(" noClick");
                }
                $(".school-orderNumber").html(data.info.count);
                $("#pop-schoolName").val(schoolName);
            }else{
                suixun.alert(data.msg);
            }
        });
    },
    /**
     * 重庆订单-配送
     * @returns {XML}
     */
    onClickChongQDeliverGoods: function (info) {
        var front = '',back = '',svar = this;
        suixun.showLoding();//显示加载中
        suixun.ajax(serverUrl+'/onlinepayManage/getIdCard.json?telephone='+info[2]+'&cardporperty=front.jpg','',"get",function(data){
            if(data.code == 200){
                front = data.info;
                suixun.ajax(serverUrl+'/onlinepayManage/getIdCard.json?telephone='+info[2]+'&cardporperty=back.jpg','',"get",function(data){
                    if(data.code == 200){
                        suixun.hideLoding(200);//隐藏加载中
                        back = data.info;
                        svar.state.ChongQData = {payDetails:info[0],schoolname:info[1],telephone:info[2],classname:info[3],studentname:info[4],orderno:info[5],smspush:info[6],front:front,back:back};
                        svar.setState({ChongQData:svar.state.ChongQData});
                        new Viewer(document.querySelector('.user-content'));//调用图片
                        $("#chongQTime").val('');
                        $("#chongQImei").val('');
                        $('.chongQPopExport').show();
                    }else{
                        suixun.alert(data.msg,function (data) {
                            if(data){
                                suixun.hideLoding(200);//隐藏加载中
                            }
                        });
                    }
                });
            }else{
                suixun.alert(data.msg,function (data) {
                    if(data){
                        suixun.hideLoding(200);//隐藏加载中
                    }
                });
            }
        });
    },
    /**
     * 重庆订单-取消订单
     * @returns {XML}
     */
    onClickCloseChongQDeliverGoods: function (orderno) {
        var svar = this;
        var param="param={";
        param = getJsonDataNotEmpty(param,"orderno", '"'+orderno+'"');
        param += "}";
        suixun.confirm_noTit("是否确定取消该订单？",function (data) {
            if(data){
                suixun.showLoding();//显示加载中
                suixun.ajax(serverUrl+'/onlinepayManage/cancelDiscount.json',param,"get",function(data){
                    suixun.hideLoding();//隐藏加载中
                    if(data.code == 200){
                        //调用ajax去查询发货
                        suixun.alert("取消订单成功！",function (data) {
                            if(data){
                                svar.onPageClick(currentpage);//更新数据
                            }
                        });
                    }else{
                        suixun.alert(data.msg)
                    }
                });
            }
        });
    },
    /**
     * 重庆订单-查询
     * @returns {XML}
     */
    onClickChongQSelete: function (info) {
        var front = '',back = '',svar = this;
        suixun.showLoding();//显示加载中
        suixun.ajax(serverUrl+'/onlinepayManage/getIdCard.json?telephone='+info[2]+'&cardporperty=front.jpg','',"get",function(data){
            if(data.code == 200){
                front = data.info;
                suixun.ajax(serverUrl+'/onlinepayManage/getIdCard.json?telephone='+info[2]+'&cardporperty=back.jpg','',"get",function(data){
                    if(data.code == 200){
                        suixun.hideLoding(200);//隐藏加载中
                        back = data.info;
                        svar.state.ChongQData = {payDetails:info[0],schoolname:info[1],telephone:info[2],classname:info[3],studentname:info[4],sendtime:info[5],mdtid:info[6],orderno:info[7],smspush:info[8],front:front,back:back};
                        svar.setState({ChongQData:svar.state.ChongQData});
                        new Viewer(document.querySelector('.user-content-select'));//调用图片
                        $('.chongQPopExportSelect').show();
                    }else{
                        suixun.alert(data.msg,function (data) {
                            if(data){
                                suixun.hideLoding(200);//隐藏加载中
                            }
                        });
                    }
                });
            }else{
                suixun.alert(data.msg,function (data) {
                    if(data){
                        suixun.hideLoding(200);//隐藏加载中
                    }
                });
            }
        });
    },
    /**
     * 重庆订单-确定配送
     * @returns {XML}
     */
    onClockCQDeliverGoodsOK: function () {
        var orderno = this.state.ChongQData.orderno,chongQTime = $("#chongQTime").val(),chongQImei = $("#chongQImei").val(),svar = this;
        if(chongQTime == ''){
            suixun.alert('配送时间不能为空！');
            return;
        }
        if(chongQImei == ''){
            suixun.alert('设备IMEI号不能为空！');
            return;
        }else if(chongQImei.length < 14){
            suixun.alert('设备IMEI号格式错误！');
            return;
        }else if(!/^[^\u4e00-\u9fa5]{0,}$/.test(chongQImei)){
            suixun.alert('设备IMEI号格式错误！');
            return;
        }
        suixun.showLoding();//显示加载中

        var param= "orderno="+orderno+'&';
        param += "mdtid="+chongQImei+'&';
        if(chongQTime != ''){
            param += "sendTime="+chongQTime+" 00:00:00";
        }
        suixun.ajax(serverUrl+'/onlinepayManage/sendChongqingDevice.json',param,"get",function(data){
            suixun.hideLoding();//隐藏加载中
            if(data.code == 200){
                suixun.alert("操作成功！",function (data) {
                    if(data){
                        $('.chongQPopExport').hide();
                        svar.onPageClick(currentpage);//更新数据
                    }
                });
            }else{
                suixun.alert(data.msg,function (type) {
                    if(type){
                        suixun.hideLoding();//隐藏加载中
                    }
                });
            }
        });

    },
    /**
     * 重庆订单-身份证审核不通过
     * @returns {XML}
     */
    onClockCQDeliverGoodsNO: function () {
        var svar = this;
        suixun.showLoding();//显示加载中
        suixun.ajax(serverUrl+'/realNameCheck/authNotPass.json?orderno='+this.state.ChongQData.orderno,'',"get",function(data){
            suixun.hideLoding();//隐藏加载中
            if(data.code == 200){
                suixun.alert("操作成功！",function (data) {
                    if(data){
                        $('.chongQPopExport').hide();
                        svar.onPageClick(currentpage);//更新数据
                    }
                });
            }else{
                suixun.alert(data.msg)
            }
        });
    },
    /**
     * 重置重庆订单
     * @returns {XML}
     */
    onClockCQDeliverReset: function () {
        var svar = this;
        var param="param={";
        param = getJsonDataNotEmpty(param,"imei",'"'+this.state.ChongQData.mdtid+'"');
        param = getJsonDataNotEmpty(param,"type",'1');
        param += "}";
        suixun.confirm_noTit("是否确定重置该订单？",function (data) {
            if(data){
                suixun.ajax(serverUrl+'/deviceInitManage/recycleDevice.json',param,"get",function(data){
                    suixun.hideLoding(200);//隐藏加载中
                    if(data.code == 200){
                        suixun.alert('回收成功！',function (data) {
                            if(data){
                                new Viewer(document.querySelector('.user-content'));//调用图片
                                $('.chongQPopExportSelect').hide();
                                $("#chongQTime").val('');
                                $("#chongQImei").val('');

                                $('.chongQPopExport').show();
                                svar.onPageClick(currentpage);
                            }
                        })
                    }else{
                        suixun.alert(data.msg);
                    }
                });
            }
        });
    },
    /**
     * 点击缴费订单下拉搜索
     * @returns {XML}
     */
    droupSelectSppPaySetMenu:function (e) {
        $('#seclectAppPaySetMenuName').html(e.target.innerHTML);
        if(e.target.innerHTML == '缴费账号'){
            $('.appPaySetMenuQueryVal').attr({'placeholder': '请输入缴费账号查询','maxlength':'11'}).val('');
        }else{
            $('.appPaySetMenuQueryVal').attr({'placeholder': '请输入设备IMEI号码查询','maxlength':'14'}).val('');
        }
    },
    render: function () {
        {
            var svar = this,Tabels = '';
            var onClickArray = [this.onClickDeliverGoods,this.onClickSeleteImei,this.onClickDeliverGoodsPromo,this.onClickCloseOrderPromo,this.onClickCloseDeliverGoods,this.onClickChongQDeliverGoods,this.onClickChongQSelete,this.onClickCloseChongQDeliverGoods];
            if(otherData.tableType=="1"){//app购买
                Tabels = this.state.tableData.map(function (data,index) {
                    return (
                        <AppTable key={index} failReason={data.failReason} deviceid={data.deviceid} listNumber={index} payDetails={data.payDetails} status={data.status} onClickSeleteImei={onClickArray[1].bind(svar,data.peopletel)} onClickDeliverGoods={onClickArray[0].bind(svar,[data.orderno,data.devicetype,data.peoplename,data.peopletel])} onClickCloseDeliverGoods={onClickArray[4].bind(svar,[data.orderno])} devicetype={data.devicetype} factory={data.factory} paystatus={data.paystatus} paymoney={data.paymoney} paytime={data.paytime} peoplename={data.peoplename} peopletel={data.peopletel} deliveryaddr={data.deliveryaddr} mdtid={data.mdtid} deliveryno={data.deliveryno} sendtime={data.sendtime} orderno={data.orderno} deliverGoods={data.deliverGoods} />
                    )
                })
            }else if(otherData.tableType=="2"){//促销活动
                Tabels = this.state.promoData.map(function (data,index) {
                    return (
                        <PromoTable key={index} devicepackage={data.devicepackage} status={data.status} telephone={data.telephone} packagefee={data.packagefee} province={data.province} city={data.city} town={data.town} devicetype={data.devicetype} listNumber={index} paystatus={data.paystatus} schoolname={data.schoolname} onClickCloseOrderPromo={onClickArray[3].bind(svar,data.orderno)} onClickDeliverGoodsPromo={onClickArray[2].bind(svar,[data.devicetype,data.schoolname,data.classname,data.studentname,data.orderno,data.province,data.city,data.town])} paymoney={data.paymoney} createtime={data.createtime} studentname={data.studentname} classname={data.classname} mdtid={data.mdtid} sendtime={data.sendtime} orderno={data.orderno} />
                    )
                })
            }else if(otherData.tableType=="3"){//重庆订单
                Tabels = this.state.ChongQDataList.map(function (data,index) {
                    return (
                        <ChongQTable key={index} smspush={data.smspush} onClickChongQDeliverGoods={onClickArray[5].bind(svar,[data.payDetails,data.schoolname,data.telephone,data.classname,data.studentname,data.orderno,data.smspush])}  onClickChongQSelete={onClickArray[6].bind(svar,[data.payDetails,data.schoolname,data.telephone,data.classname,data.studentname,data.sendtime,data.mdtid,data.orderno,data.smspush])} onClickCloseChongQDeliverGoods={onClickArray[7].bind(svar,data.orderno)} listNumber={index} payDetails={data.payDetails} paystatus={data.paystatus} orderno={data.orderno} paymoney={data.paymoney} createtime={data.createtime} studentname={data.studentname} classname={data.classname} schoolname={data.schoolname} mdtid={data.mdtid} sendtime={data.sendtime} telephone={data.telephone} status={data.status} />
                    )
                });
            }else if(otherData.tableType=="4"){//缴费订单
                Tabels = this.state.appPaySetMenuData.map(function (data,index) {
                    return (
                        <AppPaySetMenuTable key={index} onClickCloseDeliverGoods={onClickArray[4].bind(svar,[data.orderno])} smspush={data.smspush} listNumber={index} orderno={data.orderno} mdtid={data.mdtid} renewalaccount={data.renewalaccount} renewalmoney={data.renewalmoney} renewalPackage={data.renewalPackage} renewaltime={data.renewaltime} status={data.status} />
                    )
                });
            }else if(otherData.tableType=="5"){//优惠订单一
                Tabels = this.state.promoDataOne.map(function (data,index) {
                    return (
                        <PromoTableOne key={index} devicepackage={data.devicepackage} status={data.status} telephone={data.telephone} packagefee={data.packagefee} province={data.province} city={data.city} town={data.town} devicetype={data.devicetype} listNumber={index} paystatus={data.paystatus} schoolname={data.schoolname} onClickCloseOrderPromo={onClickArray[3].bind(svar,data.orderno)} onClickDeliverGoodsPromo={onClickArray[2].bind(svar,[data.devicetype,data.schoolname,data.classname,data.studentname,data.orderno,data.province,data.city,data.town])} paymoney={data.paymoney} createtime={data.createtime} studentname={data.studentname} classname={data.classname} mdtid={data.mdtid} sendtime={data.sendtime} orderno={data.orderno} />
                    )
                })
            }
            console.log(otherData.tableType)
        }
        return (
            <div className="tableManage-body">
                <div className="popExport popModel appPopExport">
                    <div className="model"></div>
                    <div className="popModel-info">
                        <form name="tableForm">
                            <div className="popModel-title">
                                <span className="popModel-title-content">
                                    <span className="popModel-title-content-solid-left"/>
                                    发货
                                    <span className="popModel-title-content-solid-right"/>
                                </span>
                                <span className="popModel-title-img" onClick={this.onClickHidePop}><img src="../img/icon/close.png" alt="关闭"/></span>
                            </div>
                            <div className="popModel-body">
                                <span className="popModel-orderno" style={{display:"none"}}/>
                                <div className="popModel-body-text">
                                    <span className="popModel-body-text-title">设备类型</span>
                                    <span className="popModel-body-text-content popModel-devicetype"/>
                                </div>
                                <div className="popModel-abreast">
                                    <div className="popModel-body-text abreast-left">
                                        <span className="popModel-body-text-title">购买联系人</span>
                                        <span className="popModel-body-text-content popModel-peoplename"/>
                                    </div>
                                    <div className="popModel-body-text abreast-right">
                                        <span className="popModel-body-text-title">手机号码</span>
                                        <span className="popModel-body-text-content popModel-peopletel" />
                                    </div>
                                </div>
                                <div className="popModel-body-input" style={{display:"none"}}>
                                    <span className="popModel-body-input-title">生产商</span>
                                    <span className="popModel-body-input-content" >
                                        <select className="export-factory" onChange={svar.onChangeOption}>
                                            <option value="请选择生产商" selected="selected" >请选择生产商</option>
                                            {
                                                factoryData.map(function (data,i) {
                                                    return (
                                                        <option value={data.selectFactory} style={{display:i==0?'none':'block'}}>{data.selectFactory}</option>
                                                    )
                                                })
                                            }
                                        </select>
                                    </span>
                                </div>
                                <div className="popModel-body-input">
                                    <span className="popModel-body-input-title">设备IMEI号</span>
                                    <span className="popModel-body-input-content">
                                        <input className="input-content export-imei" onBlur={this.onBlurInput} data-error="imei-error" type="text" placeholder="请输入设备IMEI号,多个设备用逗号隔开"  />
                                    </span>
                                    <div className="errorMsg imei-error" ></div>
                                </div>
                                <div className="popModel-body-input">
                                    <span className="popModel-body-input-title">快递公司</span>
                                    <span className="popModel-body-input-content">
                                        <input className="input-content export-company" onBlur={this.onBlurInput} data-error="company-error" type="text" maxLength="30" placeholder="请输入快递公司" />
                                    </span>
                                    <div className="errorMsg company-error" ></div>
                                </div>
                                <div className="popModel-body-input">
                                    <span className="popModel-body-input-title">快递单号</span>
                                    <span className="popModel-body-input-content">
                                        <input className="input-content export-deliveryno" onBlur={this.onBlurInput} data-error="deliveryno-error" type="text" maxLength="30" placeholder="请输入快递单号" />
                                    </span>
                                    <div className="errorMsg deliveryno-error" ></div>
                                </div>
                            </div>
                            <div className="popModel-button">
                                <span className="popModel-button-ok" onClick={this.onClockDeliverGoodsOK}>确定发货</span>
                            </div>
                        </form>
                    </div>
                </div>
                <div className="popExport popModel promoPopExport">
                    <div className="model"></div>
                    <div className="popModel-info" style={{height:"auto"}}>
                        <form name="tableForm">
                            <div className="popModel-title">
                                <span className="popModel-title-content">
                                    <span className="popModel-title-content-solid-left"/>
                                    配送
                                    <span className="popModel-title-content-solid-right"/>
                                </span>
                                <span className="popModel-title-img" onClick={this.onClickHidePop}><img src="../img/icon/close.png" alt="关闭"/></span>
                            </div>
                            <div className="popModel-body">
                                <span className="promoPopModelId" style={{display:"none"}}/>
                                <div className="popModel-body-text">
                                    <span className="popModel-body-text-title">设备类型</span>
                                    <span className="popModel-body-text-content promoPopModel-devicetype"/>
                                </div>
                                <div className="popModel-body-text">
                                    <span className="popModel-body-text-title">学校名称</span>
                                    <span className="popModel-body-text-content promoPopModel-schoolName"/>
                                </div>
                                <div className="popModel-body-text">
                                    <span className="popModel-body-text-title">省市区</span>
                                    <span className="popModel-body-text-content promoPopModel-province"/>
                                </div>
                                <div className="popModel-abreast">
                                    <div className="popModel-body-text abreast-left">
                                        <span className="popModel-body-text-title">学生班级</span>
                                        <span className="popModel-body-text-content promoPopModel-stdClass"/>
                                    </div>
                                    <div className="popModel-body-text abreast-right">
                                        <span className="popModel-body-text-title" style={{right: "65px"}}>学生姓名</span>
                                        <span className="popModel-body-text-content promoPopModel-stdName" style={{right: "45px"}} />
                                    </div>
                                </div>
                                <div className="popModel-body-input">
                                    <span className="popModel-body-input-title">配送时间</span>
                                    <span className="popModel-body-input-content input-time-span" style={{width:"165px"}}>
                                        <input className="input-content export-promoTime " id="discountOrderTime" style={{width:"135px"}} data-error="promoTime-error" type="text" placeholder="请选择配送时间"  />
                                    </span>
                                </div>
                                <div className="popModel-body-input" style={{display:"none"}}>
                                    <span className="popModel-body-input-title">设备IMEI号</span>
                                    <span className="popModel-body-input-content" >
                                        <input className="input-content export-promoImei" onBlur={this.onBlurInput} data-error="promoImei-error" maxLength="15" type="text" placeholder="请输入设备IMEI号"  />
                                    </span>
                                    <div className="errorMsg promoImei-error" ></div>
                                </div>
                            </div>
                            <div className="popModel-button" style={{bottom:"28px"}}>
                                <span className="popModel-button-ok" onClick={this.onClockDeliverGoodsPromoOK}>确定配送</span>
                            </div>
                        </form>
                    </div>
                </div>
                <div className="popSeleteImei popModel">
                    <div className="model"></div>
                    <div className="popModel-info">
                        <div className="popModel-title">
                            <span className="popModel-title-content">
                                <span className="popModel-title-content-solid-left"/>
                                查询原卡信息
                                <span className="popModel-title-content-solid-right"/>
                            </span>
                            <span className="popModel-title-img" onClick={this.onClickHidePop}><img src="../img/icon/close.png" alt="关闭"/></span>
                        </div>
                        <div className="popModel-body">
                            <div className="popModel-body-text">
                                <span className="popModel-body-text-title">设备IMEI号</span>
                                <span className="popModel-body-text-content popSeleteImei-imei"/>
                            </div>
                            <div className="popModel-body-text">
                                <span className="popModel-body-text-title">家长姓名</span>
                                <span className="popModel-body-text-content popSeleteImei-address"/>
                            </div>
                            <div className="popModel-body-text">
                                <span className="popModel-body-text-title">身份证号</span>
                                <span className="popModel-body-text-content popModel-peopletel"/>
                            </div>
                            <div className="popModel-body-text">
                                <span className="popModel-body-text-title">地址</span>
                                <span className="popModel-body-text-content popSeleteImei-address"/>
                            </div>

                        </div>
                    </div>
                </div>
                <div className="popExport popModel chongQPopExport">
                    <div className="model"></div>
                    <div className="popModel-info">
                        <form name="tableForm">
                            <div className="popModel-title">
                                <span className="popModel-title-content">
                                    <span className="popModel-title-content-solid-left"/>
                                        重庆订单配送
                                    <span className="popModel-title-content-solid-right"/>
                                </span>
                                <span className="popModel-title-img" onClick={this.onClickHidePop}><img src="../img/icon/close.png" alt="关闭"/></span>
                            </div>
                            <div className="popModel-body">
                                <div className="popModel-body-text">
                                    <span className="popModel-body-text-title">设备类型:</span>
                                    <span className="popModel-body-text-content popModel-chongQDeviceType">{this.state.ChongQData.payDetails}</span>
                                </div>
                                <div className="popModel-body-text">
                                    <span className="popModel-body-text-title">学校名称:</span>
                                    <span className="popModel-body-text-content popModel-chongQSchoolName">{this.state.ChongQData.schoolname}</span>
                                </div>
                                <div className="popModel-body-text">
                                    <span className="popModel-body-text-title">联系号码:</span>
                                    <span className="popModel-body-text-content popModel-chongQPhone">{this.state.ChongQData.telephone}</span>
                                </div>
                                <div className="popModel-abreast">
                                    <div className="popModel-body-text abreast-left">
                                        <span className="popModel-body-text-title">学生班级:</span>
                                        <span className="popModel-body-text-content popModel-chongQClass">{this.state.ChongQData.classname}</span>
                                    </div>
                                    <div className="popModel-body-text abreast-right">
                                        <span className="popModel-body-text-title">学生姓名:</span>
                                        <span className="popModel-body-text-content popModel-chongQstudentName" >{this.state.ChongQData.studentname}</span>
                                    </div>
                                </div>
                                <div className="popModel-body-img" style={{display:'none'}}>
                                    <span className="popModel-body-input-title">实名认证:</span>
                                    <ul className="user-content">
                                        <li><img src={this.state.ChongQData.front} className="user-img user-img-left" /></li>
                                        <li><img src={this.state.ChongQData.back} className="user-img user-img-right" /></li>
                                    </ul>
                                </div>
                                <div className="popModel-body-input">
                                    <span className="popModel-body-input-title">配送时间</span>
                                    <span className="popModel-body-input-content input-time-span" style={{width:"200px"}}>
                                        <input className="input-content chongQ-time" style={{width:"185px",backgroundPosition:'172px 9px'}} id="chongQTime" type="text" placeholder="请选择配送时间"  />
                                    </span>
                                </div>
                                <div className="popModel-body-input">
                                    <span className="popModel-body-input-title">设备IMEI号</span>
                                    <span className="popModel-body-input-content">
                                        <input className="input-content export-imei" onBlur={this.onBlurInput} data-error="imei-error" id="chongQImei" maxLength="15" type="text" placeholder="请输入设备IMEI号" />
                                    </span>
                                    <div className="errorMsg imei-error" ></div>
                                </div>
                            </div>
                            <div className="popModel-button">
                                <span className="popModel-button-ok" style={{padding:'15px 55px'}} onClick={this.onClockCQDeliverGoodsOK}>确定配送</span>
                                <span className="popModel-button-no" style={{display:'none'}} onClick={this.onClockCQDeliverGoodsNO}>{this.state.ChongQData.smspush=='0'?'身份证照片不清晰(短信通知用户)':'再次发送(已发送短信通知用户)'}</span>
                            </div>
                        </form>
                    </div>
                </div>
                <div className="chongQPopExportSelect popExport popModel">
                    <div className="model"></div>
                    <div className="popModel-info">
                        <div className="popModel-title">
                            <span className="popModel-title-content">
                                <span className="popModel-title-content-solid-left"/>
                                    重庆订单信息
                                <span className="popModel-title-content-solid-right"/>
                            </span>
                            <span className="popModel-title-img" onClick={this.onClickHidePop}><img src="../img/icon/close.png" alt="关闭"/></span>
                        </div>
                        <div className="popModel-body">
                            <div className="popModel-body-text">
                                <span className="popModel-body-text-title">设备类型:</span>
                                <span className="popModel-body-text-content ">{this.state.ChongQData.payDetails}</span>
                            </div>
                            <div className="popModel-body-text">
                                <span className="popModel-body-text-title">学校名称:</span>
                                <span className="popModel-body-text-content ">{this.state.ChongQData.schoolname}</span>
                            </div>
                            <div className="popModel-body-text">
                                <span className="popModel-body-text-title">联系号码:</span>
                                <span className="popModel-body-text-content ">{this.state.ChongQData.telephone}</span>
                            </div>
                            <div className="popModel-abreast">
                                <div className="popModel-body-text abreast-left">
                                    <span className="popModel-body-text-title">学生班级:</span>
                                    <span className="popModel-body-text-content ">{this.state.ChongQData.classname}</span>
                                </div>
                                <div className="popModel-body-text abreast-right">
                                    <span className="popModel-body-text-title">学生姓名:</span>
                                    <span className="popModel-body-text-content " >{this.state.ChongQData.studentname}</span>
                                </div>
                            </div>
                            <div className="popModel-body-img" style={{display:'none'}}>
                                <span className="popModel-body-input-title">实名认证:</span>
                                <ul className="user-content-select">
                                    <li><img src={this.state.ChongQData.front} className="user-img user-img-left" /></li>
                                    <li><img src={this.state.ChongQData.back} className="user-img user-img-right" /></li>
                                </ul>
                            </div>
                            <div className="popModel-abreast">
                                <div className="popModel-body-text abreast-left">
                                    <span className="popModel-body-text-title">配送时间:</span>
                                    <span className="popModel-body-text-content ">{this.state.ChongQData.sendtime}</span>
                                </div>
                                <div className="popModel-body-text abreast-right">
                                    <span className="popModel-body-text-title">设备IMEI号:</span>
                                    <span className="popModel-body-text-content " >{this.state.ChongQData.mdtid}</span>
                                </div>
                            </div>
                            <div className="popModel-button" style={{bottom:'-15px'}}>
                                <span className="popModel-button-ok" onClick={this.onClockCQDeliverReset}>回收(重新配送)</span>
                            </div>
                        </div>
                    </div>
                </div>
                <div className="popExport popModel popBatchDelivery">
                    <div className="model"></div>
                    <div className="popModel-info" style={{height:"auto"}}>
                        <form name="tableForm">
                            <div className="popModel-title">
                                <span className="popModel-title-content">
                                    <span className="popModel-title-content-solid-left" style={{width:"143px"}}/>
                                        批量配送
                                    <span className="popModel-title-content-solid-right" style={{width:"143px"}}/>
                                </span>
                                <span className="popModel-title-img" onClick={this.onClickHidePop}><img src="../img/icon/close.png" alt="关闭"/></span>
                            </div>
                            <div className="popModel-body">
                                <input type="hidden" id="batchDelivery_orderList"/>
                                <div className="popModel-body-input">
                                    <span className="popModel-body-input-title">配送时间</span>
                                    <span className="popModel-body-input-content input-time-span" style={{width:"165px"}}>
                                        <input className="input-content export-promoTime " id="batchDeliveryTime" style={{width:"135px"}} data-error="promoTime-error" type="text" placeholder="请选择配送时间"  />
                                    </span>
                                </div>
                                <div className="popModel-body-text">
                                    <span className="popModel-body-text-title">总订单数</span>
                                    <span className="popModel-body-text-content batchDelivery-orderNumber"/>
                                </div>
                            </div>
                            <div className="popModel-button" style={{bottom:"28px"}}>
                                <span className="popModel-button-ok" onClick={this.onClockBatchDeliverGoodsPromoOK}>确定配送</span>
                            </div>
                        </form>
                    </div>
                </div>
                <div className="popExport popModel schoolDistribution">
                    <div className="model"></div>
                    <div className="popModel-info" style={{height:"auto"}}>
                        <form name="tableForm">
                            <div className="popModel-title">
                                <span className="popModel-title-content">
                                    <span className="popModel-title-content-solid-left" style={{width:"140px"}}/>
                                        按学校配送
                                    <span className="popModel-title-content-solid-right" style={{width:"140px"}}/>
                                </span>
                                <span className="popModel-title-img" onClick={this.onClickHidePop}><img src="../img/icon/close.png" alt="关闭"/></span>
                            </div>
                            <div className="popModel-body">
                                <div className="popModel-body-input">
                                    <span className="popModel-body-input-title">选择学校</span>
                                    <span className="popModel-body-input-content">
                                        <input className="input-content school " onBlur={this.onBlurInput} onClick={this.onClickSchool} readOnly="readOnly" data-list="pop-schoolName"  id="pop-schoolName" data-error="schoolName-error" maxLength="50" type="text" placeholder="请选择配送学校"/>
                                        <span className="pop-lower-right-corner" />
                                    </span>
                                    <div className="schoolList pop-schoolName" data-inputId="pop-schoolName" style={{width:"278px"}}>
                                        {
                                            schoolDataList.map(function (data) {
                                                return (
                                                    <span className="schoolList-value" onClick={svar.onClickPopSchoolName}>{data.schoolname}</span>
                                                )
                                            })
                                        }
                                    </div>
                                </div>
                                <div className="popModel-body-input">
                                    <span className="popModel-body-input-title">配送时间</span>
                                    <span className="popModel-body-input-content input-time-span" style={{width:"165px"}}>
                                        <input className="input-content export-promoTime " id="schoolOrderNumberPromoTime" style={{width:"135px"}} data-error="promoTime-error" type="text" placeholder="请选择配送时间"  />
                                    </span>
                                </div>
                                <div className="popModel-body-text">
                                    <span className="popModel-body-text-title">总订单数</span>
                                    <span className="popModel-body-text-content school-orderNumber"/>
                                </div>
                            </div>
                            <div className="popModel-button" style={{bottom:"28px"}}>
                                <span className="popModel-button-ok schoolDistribution-button noClick" onClick={this.onClockSchoolDeliverGoodsPromoOK}>确定配送</span>
                            </div>
                        </form>
                    </div>
                </div>
                <header>
                    <div className="header-left">
                        <div className="header-left-studentInfo">
                            <span data-orderType="2" onClick={this.onClickShowOrder} className={otherData.tableType=="2"?"header-left-button showOrder":"header-left-button" }>限时优惠订单 <span data-orderType="2"  className="delgoodsNum promoDelgoodsNumOne"/></span>
                            <span data-orderType="3" onClick={this.onClickShowOrder} style={{left: "10px"}} className={otherData.tableType=="3"?"header-left-button showOrder":"header-left-button" }>重庆订单 <span data-orderType="3"  className="delgoodsNum chongQDelgoodsNum"/></span>
                            <span data-orderType="1"  onClick={this.onClickShowOrder} className={otherData.tableType=="1"?"header-left-button showOrder":"header-left-button " } style={{left:"20px"}}>购买订单 <span data-orderType="1"  className="delgoodsNum appDelgoodsNum"/></span>
                            <span data-orderType="4"  onClick={this.onClickShowOrder} className={otherData.tableType=="4"?"header-left-button showOrder":"header-left-button " } style={{left:"30px"}}>缴费订单</span>
                            <span data-orderType="5"  onClick={this.onClickShowOrder} className={otherData.tableType=="5"?"header-left-button showOrder":"header-left-button " } style={{left:"40px"}}>优惠订单1 <span data-orderType="4"  className="delgoodsNum promoDelgoodsNumTwo"/></span>
                        </div>
                        <div className="header-left-annotationsInfo">
                            <img src="../img/icon/annotations.png" />
                            <span className="header-left-annotations-arrowsLeft"/>
                            <div className="header-left-annotations">这里是注释。</div>
                        </div>
                    </div>
                    <div className="header-right">
                        <div className="header-right-select droup-select droup-select-appPaySetMenu" style={{display:otherData.tableType == "4"?'block':'none',borderRadius:"5px 0 0 5px",right:'26px',color:'#333',borderColor:'#ccc',height:'36px'}}>
                            <div className="school-or-table school-or-parent" style={{width:'85px'}} id="seclectAppPaySetMenuName" data-className="appPaySetMenu-drop-down">设备IMEI号</div>
                            <span className="lower-right-corner" data-className="appPaySetMenu-drop-down" style={{left:'84px',borderBottom:'10px solid #999'}}/>
                            <div className="drop-down appPaySetMenu-drop-down" style={{top:'2px'}}>
                                <span className="select-value school-name" onClick={this.droupSelectSppPaySetMenu}>设备IMEI号</span>
                                <span className="select-value student-name" onClick={this.droupSelectSppPaySetMenu}>缴费账号</span>
                            </div>
                        </div>
                        <div className="header-right-query" style={{borderRadius:otherData.tableType == "4"?"0 5px 5px 0":"5px",left:otherData.tableType == "4"?"-27px":"-44px"}}>
                            <div className="header-right-query-input">
                                <input className="queryVal promoQueryVal enterEvent" id="promoQueryVal" style={{display:otherData.tableType == "2"?'block':otherData.tableType == "5"?'block':'none'}} maxLength="20"  type="text" placeholder="请输入学生姓名查询"/>
                                <input className="queryVal appQueryVal enterEvent" id="appQueryVal" style={{display:otherData.tableType == "1"?'block':'none'}} onInput={this.onInputNumber} maxLength="11"  type="number" placeholder="请输入用户手机号码查询"/>
                                <input className="queryVal chongQQueryVal enterEvent" id="chongQQueryVal" style={{display:otherData.tableType == "3"?'block':'none'}} onInput={this.onInputNumber} maxLength="11"  type="number" placeholder="请输入用户手机号码查询"/>
                                <input className="queryVal appPaySetMenuQueryVal enterEvent" id="appPaySetMenuQueryVal" style={{display:otherData.tableType == "4"?'block':'none'}} type="text" maxLength="14"  placeholder="请输入设备IMEI号码查询"/>
                            </div>
                            <div className="header-right-query-img" onClick={this.onClickQuery}></div>
                        </div>
                        <div style={{float: "left",position:"relative",display:otherData.tableType == "2"?'block':otherData.tableType == "5"?'block':'none'}}>
                            <div className="header-right-select droup-select droup-select-paySchool" style={{width:"200px"}}>
                                <div className="school-or-student  school-or-table" id="seclectSchoolName" data-className="payPromo-drop-down" style={{width:"180px"}}>筛选学校：全部</div>
                                <span className="lower-right-corner" data-className="paySchool-drop-down" style={{left:"180px"}}/>
                                <div className="drop-down paySchool-drop-down">
                                    <span className="select-value select-left school-select-value" onClick={svar.onClickSelectSchool.bind(svar,"筛选学校：全部")}>筛选学校：全部</span>
                                    {
                                        schoolDataAll.map(function (data) {
                                            return (
                                                <span className="select-value select-left" onClick={svar.onClickSelectSchool.bind(svar,data.schoolname)}>{data.schoolname}</span>
                                            )
                                        })
                                    }
                                </div>
                            </div>
                            <div className="header-right-select droup-select droup-select-payPromo" style={{right: "15px"}}>
                                <div className="school-or-student  school-or-table payPromo" data-className="payPromo-drop-down">按条件筛选</div>
                                <span className="lower-right-corner" data-className="payPromo-drop-down" />
                                <div className="drop-down payPromo-drop-down" >
                                    <span className="select-value" onClick={svar.onClickSelectFactoryPromo.bind(svar,"全部")}>全部</span>
                                    <span className="select-value" onClick={svar.onClickSelectFactoryPromo.bind(svar,"已配送")}>已配送</span>
                                    <span className="select-value" onClick={svar.onClickSelectFactoryPromo.bind(svar,"未配送")}>未配送</span>
                                    <span className="select-value" onClick={svar.onClickSelectFactoryPromo.bind(svar,"已取消")}>已取消</span>
                                </div>
                            </div>
                            <span className="header-right-button schoolDelivery" onClick={this.schoolDelivery} >按学校配送</span>
                            <span className="header-right-button batchDelivery" onClick={this.batchDelivery} >批量配送</span>
                        </div>
                        <div className="header-right-select droup-select droup-select-payApp" style={{display:otherData.tableType == "1"?'block':'none'}}>
                            <div className="school-or-student  school-or-table payApp" data-className="payApp-drop-down">按条件筛选</div>
                            <span className="lower-right-corner" data-className="payApp-drop-down"/>
                            <div className="drop-down payApp-drop-down ">
                                <span className="select-value" onClick={svar.onClickSelectFactory.bind(svar,"全部")}>全部</span>
                                <span className="select-value" onClick={svar.onClickSelectFactory.bind(svar,"已发货")}>已发货</span>
                                <span className="select-value" onClick={svar.onClickSelectFactory.bind(svar,"未发货")}>未发货</span>
                                <span className="select-value" onClick={svar.onClickSelectFactory.bind(svar,"已取消")}>已取消</span>
                            </div>
                        </div>
                        <div className="header-right-select droup-select APP-select-HJY" style={{right: "15px",display:otherData.tableType == "1"?'block':'none'}}>
                            <div className="school-or-student  school-or-table APP-select-HJY-value" data-className="APP-select-HJY-down">APP订单</div>
                            <span className="lower-right-corner" data-className="APP-select-HJY-down"/>
                            <div className="drop-down APP-select-HJY-down ">
                                <span className="select-value" onClick={svar.changeOrderType.bind(svar,"APP订单",1)}>APP订单</span>
                                <span className="select-value" onClick={svar.changeOrderType.bind(svar,"和教育订单",1)}>和教育订单</span>
                            </div>
                        </div>
                        <div className="header-right-select droup-select APP-select-HJY-two" style={{right: "15px",display:otherData.tableType == "4"?'block':'none'}}>
                            <div className="school-or-student  school-or-table APP-select-HJY-two-value" data-className="APP-select-HJY-two-down">APP订单</div>
                            <span className="lower-right-corner" data-className="APP-select-HJY-two-down"/>
                            <div className="drop-down APP-select-HJY-two-down ">
                                <span className="select-value" onClick={svar.changeOrderType.bind(svar,"APP订单",2)}>APP订单</span>
                                <span className="select-value" onClick={svar.changeOrderType.bind(svar,"和教育订单",2)}>和教育订单</span>
                            </div>
                        </div>
                        <div className="header-right-select droup-select droup-select-chongQPromo" style={{right: "30px",display:otherData.tableType == "3"?'block':'none'}}>
                            <div className="school-or-student  school-or-table chongQPromo" data-className="chongQPromo-drop-down">按条件筛选</div>
                            <span className="lower-right-corner" data-className="chongQPromo-drop-down" />
                            <div className="drop-down chongQPromo-drop-down" >
                                <span className="select-value" onClick={svar.onClickSelectFactoryPromoChongQ.bind(svar,"全部")}>全部</span>
                                <span className="select-value" onClick={svar.onClickSelectFactoryPromoChongQ.bind(svar,"已配送")}>已配送</span>
                                <span className="select-value" onClick={svar.onClickSelectFactoryPromoChongQ.bind(svar,"未配送")}>未配送</span>
                                <span className="select-value" onClick={svar.onClickSelectFactoryPromoChongQ.bind(svar,"已取消")}>已取消</span>
                            </div>
                        </div>
                        <div className="export" onClick={this.onClickExport}>
                            <span className="export-img"><img src="../img/icon/export.png" /></span>
                            <span className="export-text">导出excel</span>
                        </div>
                    </div>
                </header>
                <div className="studentsInfo tableInfo">
                    <div className="studentsInfo-data tableInfo-data">
                        <div className="studentsInfo-data-table tableInfo-data-table" >
                            <table className="head-body head-body">
                                {
                                    otherData.tableType=="1"?
                                        <thead>
                                            <th style={{width: '4%'}}>序号</th>
                                            <th style={{width: '10%'}}>购买详情</th>
                                            <th style={{width: '8%'}}>订单号</th>
                                            <th style={{width: '5%'}}>付款状态</th>
                                            <th style={{width: '5%'}}>付款金额</th>
                                            <th style={{width: '9%'}}>购买日期</th>
                                            <th style={{width: '7%'}}>联系人</th>
                                            <th style={{width: '7%'}}>联系电话</th>
                                            <th style={{width: '11%'}}>收货地址</th>
                                            <th style={{width: '8%'}}>设备IMEI号</th>
                                            <th style={{width: '7%'}}>快递单号</th>
                                            <th style={{width: '9%'}}>发货时间</th>
                                            <th style={{width: '9%'}}>操作</th>
                                        </thead>
                                    :otherData.tableType=="2"?
                                            <thead>
                                                <th style={{width: '3%'}}><input type="checkbox" className="onlineCheckBox" onClick={this.onlineChildCheckBox}/></th>
                                                <th style={{width: '4%'}}>序号</th>
                                                <th style={{width: '7%'}}>设备类型</th>
                                                <th style={{width: '7%'}}>订单号</th>
                                                <th style={{width: '7%'}}>付款状态</th>
                                                <th style={{width: '7%'}}>设备套餐</th>
                                                <th style={{width: '7%'}}>付款金额</th>
                                                <th style={{width: '10%'}}>购买日期</th>
                                                <th style={{width: '6%'}}>学生姓名</th>
                                                <th style={{width: '6%'}}>手机号</th>
                                                <th style={{width: '8%'}}>班级</th>
                                                <th style={{width: '10%'}}>学校</th>
                                                <th style={{width: '9%'}}>配送时间</th>
                                                <th style={{width: '9%'}}>操作</th>
                                            </thead>
                                        :otherData.tableType=="3"?
                                            <thead>
                                                <th style={{width: '4%'}}>序号</th>
                                                <th style={{width: '8%'}}>设备类型</th>
                                                <th style={{width: '7%'}}>付款状态</th>
                                                <th style={{width: '10%'}}>订单号</th>
                                                <th style={{width: '6%'}}>付款金额</th>
                                                <th style={{width: '8%'}}>购买时间</th>
                                                <th style={{width: '7%'}}>学生姓名</th>
                                                <th style={{width: '6%'}}>班级</th>
                                                <th style={{width: '10%'}}>学校</th>
                                                <th style={{width: '8%'}}>用户手机号</th>
                                                <th style={{width: '9%'}}>设备IMEI号</th>
                                                <th style={{width: '8%'}}>配送时间</th>
                                                <th style={{width: '9%'}}>操作</th>
                                            </thead>
                                        :otherData.tableType=="4"?
                                            <thead>
                                                <th style={{width: '8%'}}>序号</th>
                                                <th style={{width: '16%'}}>订单号</th>
                                                <th style={{width: '15%'}}>设备IMEI号</th>
                                                <th style={{width: '12%'}}>缴费账号</th>
                                                <th style={{width: '12%'}}>缴费金额</th>
                                                <th style={{width: '12%'}}>缴费年限</th>
                                                <th style={{width: '15%'}}>缴费时间</th>
                                                <th style={{width: '10%'}}>操作</th>
                                            </thead>
                                            :<thead>
                                                <th style={{width: '3%'}}><input type="checkbox" className="onlineCheckBox" onClick={this.onlineChildCheckBox}/></th>
                                                <th style={{width: '4%'}}>序号</th>
                                                <th style={{width: '7%'}}>设备类型</th>
                                                <th style={{width: '7%'}}>订单号</th>
                                                <th style={{width: '6%'}}>付款状态</th>
                                                <th style={{width: '6%'}}>设备套餐</th>
                                                <th style={{width: '6%'}}>付款金额</th>
                                                <th style={{width: '8%'}}>购买日期</th>
                                                <th style={{width: '6%'}}>学生姓名</th>
                                                <th style={{width: '6%'}}>手机号</th>
                                                <th style={{width: '7%'}}>班级</th>
                                                <th style={{width: '9%'}}>学校</th>
                                                <th style={{width: '8%'}}>配送地址</th>
                                                <th style={{width: '8%'}}>配送时间</th>
                                                <th style={{width: '9%'}}>操作</th>
                                                </thead>
                                }
                                <tbody className="onlinePay-tbody">
                                    {Tabels==""?'':Tabels}
                                </tbody>
                            </table>
                            {Tabels==""?<div className="tableNoData">{tableNoDataCount}</div>:''}
                        </div>
                    </div>
                    <Page otherData={this.state.otherData} onPageClick={this.onPageClick} />
                </div>
                <footer id="copyright">
                    <span><img src="../img/icon/copyright.png"/>{copyright}</span>
                </footer>
            </div>
        );
    }
});
ReactDOM.render(
    <Main  otherData={otherData} tableData={tableData} promoData={promoData} schoolDataAll={schoolDataAll} schoolDataList={schoolDataList} />,
    document.getElementById('tableManage')
);
/**
 * 和教育、APP
 */
$(".droup-select-payApp").click(function () {
    var dropDown = $(this).find('.payApp-drop-down');
    if(dropDown.is(":hidden")){
        dropDown.slideDown();
    }else{
        dropDown.slideUp();
    }
});
/**
 * 购买订单-发货条件
 */
$(".APP-select-HJY").click(function () {
    var dropDown = $(this).find('.APP-select-HJY-down');
    if(dropDown.is(":hidden")){
        dropDown.slideDown();
    }else{
        dropDown.slideUp();
    }
});
/**
 * 购买订单-发货条件
 */
$(".APP-select-HJY-two").click(function () {
    var dropDown = $(this).find('.APP-select-HJY-two-down');
    if(dropDown.is(":hidden")){
        dropDown.slideDown();
    }else{
        dropDown.slideUp();
    }
});
/**
 * 限时优惠订单-配送条件
 */
$(".droup-select-payPromo").click(function () {
    $('.paySchool-drop-down').slideUp();
    var dropDown = $(this).find('.payPromo-drop-down');
    if(dropDown.is(":hidden")){
        dropDown.slideDown();
    }else{
        dropDown.slideUp();
    }
});
/**
 * 重庆优惠订单-配送条件
 */
$(".droup-select-chongQPromo").click(function () {
    var dropDown = $(this).find('.chongQPromo-drop-down');
    if(dropDown.is(":hidden")){
        dropDown.slideDown();
    }else{
        dropDown.slideUp();
    }
});
/**
 * 限时优惠订单-按学校筛选
 */
$(".droup-select-paySchool").click(function () {
    $('.payPromo-drop-down').slideUp();
    $('.payApp-drop-down').slideUp();
    var dropDown = $(this).find('.paySchool-drop-down');
    if(dropDown.is(":hidden")){
        dropDown.slideDown();
    }else{
        dropDown.slideUp();
    }
});
/**
 * 缴费订单
 */
$(".droup-select-appPaySetMenu").click(function () {
    var dropDown = $(this).find('.appPaySetMenu-drop-down');
    if(dropDown.is(":hidden")){
        dropDown.slideDown();
    }else{
        dropDown.slideUp();
    }
});
$('.export-promoTime').datetimepicker({
    format: "Y-m-d ", //格式化日期
    timepicker: false, //显示时间选项
    todayButton: false, //关闭选择今天按钮
    step:5,//时间间隔
    minDate:suixun.getFormatDate().substring(0,10), // and tommorow is maximum date calendar
});
$('.chongQ-time').datetimepicker({
    format: "Y-m-d ", //格式化日期H:i:s
    timepicker: false, //显示时间选项
    todayButton: true, //关闭选择今天按钮
    step:1,//时间间隔
    minDate:suixun.getFormatDate().substring(0,10), // and tommorow is maximum date calendar
});

//学校下拉列表
$("*").bind("click",function(e){
    var target = $(e.target);
    if(target.closest(".schoolList-value").length == 1){
        if("pop-schoolName" == $(target.parent()).attr("data-inputId")){
            // $("#"+$(target.parent()).attr("data-inputId")+"").val(target.html());
        }
        $(".schoolList").hide();
    }else{
        $(".schoolList").hide();
    }
});